1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00
emacs/lisp/textmodes/bibtex.el

3955 lines
155 KiB
EmacsLisp
Raw Normal View History

1992-05-30 23:54:21 +00:00
;;; bibtex.el --- BibTeX mode for GNU Emacs
1997-06-14 18:45:38 +00:00
;; Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
1992-07-22 04:22:30 +00:00
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de>
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; Bengt Martensson <bengt@mathematik.uni-Bremen.de>
1992-07-17 07:10:46 +00:00
;; Mark Shapiro <shapiro@corto.inria.fr>
;; Mike Newton <newton@gumby.cs.caltech.edu>
;; Aaron Larson <alarson@src.honeywell.com>
;; Maintainer: Dirk Herrmann <D.Herrmann@tu-bs.de>
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Keywords: BibTeX, LaTeX, TeX
1992-07-17 07:10:46 +00:00
1991-05-09 21:50:45 +00:00
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
1993-02-10 07:08:53 +00:00
;; the Free Software Foundation; either version 2, or (at your option)
1991-05-09 21:50:45 +00:00
;; any later version.
;; 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
1996-01-14 07:34:30 +00:00
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
1991-05-09 21:50:45 +00:00
;;; Commentary:
1996-01-14 07:34:30 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Major mode for editing and validating BibTeX files.
1992-07-16 21:47:34 +00:00
;; Usage:
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; See documentation for function bibtex-mode (or type "\M-x describe-mode"
1997-08-22 02:23:24 +00:00
;; when you are in BibTeX mode).
1992-07-16 21:47:34 +00:00
;; Todo:
;; Distribute texinfo file.
;;; Code:
1996-01-14 07:34:30 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(eval-when-compile
(require 'compile))
;; User Options:
1992-07-16 21:47:34 +00:00
1997-08-22 02:05:30 +00:00
(defgroup bibtex nil
"BibTeX mode."
:group 'tex
:prefix "bibtex-")
(defgroup bibtex-autokey nil
"Generates automatically a key from the author/editor and the title field"
:group 'bibtex
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
:prefix "bibtex-autokey-")
1997-08-22 02:05:30 +00:00
(defcustom bibtex-mode-hook nil
"List of functions to call on entry to BibTeX mode."
:group 'bibtex
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
:type 'hook)
1997-08-22 02:05:30 +00:00
(defcustom bibtex-field-delimiters 'braces
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*Controls type of field delimiters used.
1997-08-22 02:23:24 +00:00
Set this to `braces' or `double-quotes' according to your personal
preferences. This variable is buffer-local."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type '(choice (const braces)
(const double-quotes)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(make-variable-buffer-local 'bibtex-field-delimiters)
1997-08-22 02:05:30 +00:00
(defcustom bibtex-entry-delimiters 'braces
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*Controls type of entry delimiters used.
1997-08-22 02:23:24 +00:00
Set this to `braces' or `parentheses' according to your personal
preferences. This variable is buffer-local."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type '(choice (const braces)
(const parentheses)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(make-variable-buffer-local 'bibtex-entry-delimiters)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-include-OPTcrossref '("InProceedings" "InCollection")
"*All entries listed here will have an OPTcrossref field."
:group 'bibtex
:type '(repeat string))
1992-07-16 21:47:34 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-include-OPTkey t
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*If non-nil, all entries will have an OPTkey field.
If this is a string, it will be used as the initial field text.
1997-08-22 02:05:30 +00:00
If this is a function, it will be called to generate the initial field text."
:group 'bibtex
:type '(choice (const :tag "None" nil)
(string :tag "Initial text")
(function :tag "Initialize Function" :value fun)
(other :tag "Default" t)))
1997-08-22 02:05:30 +00:00
(defcustom bibtex-user-optional-fields
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'(("annote" "Personal annotation (ignored)"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*List of optional fields the user wants to have always present.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Entries should be of the same form as the OPTIONAL and
1997-08-22 02:23:24 +00:00
CROSSREF-OPTIONAL lists in `bibtex-entry-field-alist' (see documentation
1997-08-22 02:05:30 +00:00
of this variable for details)."
:group 'bibtex
:type '(repeat
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(group (string :tag "Field")
(string :tag "Comment")
(option (group :inline t
:extra-offset -4
(choice :tag "Init" :value ""
string
function))))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-entry-format '(opts-or-alts numerical-fields)
1997-08-22 02:23:24 +00:00
"*Controls type of formatting performed by `bibtex-clean-entry'.
It may be t, nil, or a list of symbols out of the following:
1997-08-22 02:23:24 +00:00
opts-or-alts Delete empty optional and alternative fields and
remove OPT and ALT prefixes from used fields.
numerical-fields Delete delimiters around numeral fields.
page-dashes Change double dashes in page field to single dash
(for scribe compatibility).
inherit-booktitle If entry contains a crossref field and booktitle
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
field is empty, it is set to the contents of the
1997-08-22 02:23:24 +00:00
title field of the crossreferenced entry.
Caution: this will work only if buffer is
correctly sorted.
realign Realign entries, so that field texts and perhaps equal
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
signs (depending on the value of
`bibtex-align-at-equal-sign') begin in the same column.
1997-08-22 02:23:24 +00:00
last-comma Add or delete comma on end of last field in entry,
according to value of `bibtex-comma-after-last-field'.
delimiters Change delimiters according to variables
`bibtex-field-delimiters' and `bibtex-entry-delimiters'.
unify-case Change case of entry and field names.
The value t means do all of the above formatting actions.
The value nil means do no formatting at all."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type '(choice (const :tag "None" nil)
(const :tag "All" t)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(set :menu-tag "Some"
(const opts-or-alts)
(const numerical-fields)
(const page-dashes)
(const inherit-booktitle)
(const realign)
(const last-comma)
(const delimiters)
(const unify-case))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-clean-entry-hook nil
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*List of functions to call when entry has been cleaned.
1997-08-22 02:23:24 +00:00
Functions are called with point inside the cleaned entry, and the buffer
1997-08-22 02:05:30 +00:00
narrowed to just the entry."
:group 'bibtex
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
:type 'hook)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-sort-ignore-string-entries t
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*If non-nil, BibTeX @String entries are not sort-significant.
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
That means they are ignored when determining ordering of the buffer
(e.g., sorting, locating alphabetical position for new entries, etc.).
1997-08-22 02:23:24 +00:00
This variable is buffer-local."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type 'boolean)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(make-variable-buffer-local 'bibtex-sort-ignore-string-entries)
1992-07-16 21:47:34 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-maintain-sorted-entries nil
1997-08-22 02:23:24 +00:00
"*If non-nil, BibTeX mode maintains all BibTeX entries in sorted order.
Setting this variable to nil will strip off some comfort (e.g., TAB
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
completion for reference keys in minibuffer, automatic detection of
1997-08-22 02:23:24 +00:00
duplicates) from BibTeX mode. See also `bibtex-sort-ignore-string-entries'.
This variable is buffer-local."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type 'boolean)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(make-variable-buffer-local 'bibtex-maintain-sorted-entries)
1997-08-22 02:05:30 +00:00
(defcustom bibtex-field-kill-ring-max 20
1997-08-22 02:23:24 +00:00
"*Max length of `bibtex-field-kill-ring' before discarding oldest elements."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-entry-kill-ring-max 20
1997-08-22 02:23:24 +00:00
"*Max length of `bibtex-entry-kill-ring' before discarding oldest elements."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-parse-keys-timeout 60
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*Specifies interval for parsing buffers.
All BibTeX buffers in Emacs are parsed if Emacs has been idle
1997-08-22 02:23:24 +00:00
`bibtex-parse-keys-timeout' seconds. Only buffers which were modified
1997-08-22 02:05:30 +00:00
after last parsing and which are maintained in sorted order are parsed."
:group 'bibtex
:type 'integer)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defvar bibtex-entry-field-alist
'(
("Article" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("journal" "Name of the journal (use string, remove braces)")
("year" "Year of publication"))
(("volume" "Volume of the journal")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("number" "Number of the journal (only allowed if entry contains volume)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("pages" "Pages in the journal")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("month" "Month of the publication as a string (remove braces)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))
((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article (BibTeX converts it to lowercase)"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("pages" "Pages in the journal")
("journal" "Name of the journal (use string, remove braces)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("year" "Year of publication")
("volume" "Volume of the journal")
("number" "Number of the journal")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("Book" . (((("author" "Author1 [and Author2 ...] [and others]" "" t)
("editor" "Editor1 [and Editor2 ...] [and others]" "" t)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("title" "Title of the book")
("publisher" "Publishing company")
("year" "Year of publication"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("volume" "Volume of the book in the series")
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))
((("author" "Author1 [and Author2 ...] [and others]" "" t)
("editor" "Editor1 [and Editor2 ...] [and others]" "" t)
("title" "Title of the book"))
(("publisher" "Publishing company")
("year" "Year of publication")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("volume" "Volume of the book in the series")
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("Booklet" . (((("title" "Title of the booklet (BibTeX converts it to lowercase)"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(("author" "Author1 [and Author2 ...] [and others]")
("howpublished" "The way in which the booklet was published")
("address" "Address of the publisher")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("year" "Year of publication")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("InBook" . (((("author" "Author1 [and Author2 ...] [and others]" "" t)
("editor" "Editor1 [and Editor2 ...] [and others]" "" t)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("title" "Title of the book")
("chapter" "Chapter in the book")
("publisher" "Publishing company")
("year" "Year of publication"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("volume" "Volume of the book in the series")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("type" "Word to use instead of \"chapter\"")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("pages" "Pages in the book")
("note" "Remarks to be put at the end of the \\bibitem")))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
((("author" "Author1 [and Author2 ...] [and others]" "" t)
("editor" "Editor1 [and Editor2 ...] [and others]" "" t)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("title" "Title of the book")
("chapter" "Chapter in the book"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("pages" "Pages in the book")
("publisher" "Publishing company")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("year" "Year of publication")
("volume" "Volume of the book in the series")
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("type" "Word to use instead of \"chapter\"")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
("InCollection" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article in book (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("booktitle" "Name of the book")
("publisher" "Publishing company")
("year" "Year of publication"))
(("editor" "Editor1 [and Editor2 ...] [and others]")
("volume" "Volume of the book in the series")
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
("type" "Word to use instead of \"chapter\"")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("chapter" "Chapter in the book")
("pages" "Pages in the book")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))
((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article in book (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("booktitle" "Name of the book"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("pages" "Pages in the book")
("publisher" "Publishing company")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("year" "Year of publication")
("editor" "Editor1 [and Editor2 ...] [and others]")
("volume" "Volume of the book in the series")
("number" "Number of the book in a small series (overwritten by volume)")
("series" "Series in which the book appeared")
("type" "Word to use instead of \"chapter\"")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("chapter" "Chapter in the book")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("address" "Address of the publisher")
("edition" "Edition of the book as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
("InProceedings" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("booktitle" "Name of the conference proceedings")
("year" "Year of publication"))
(("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")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("pages" "Pages in the conference proceedings")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("address" "Location of the Proceedings")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("organization" "Sponsoring organization of the conference")
("publisher" "Publishing company, its location")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))
((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the article in proceedings (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("booktitle" "Name of the conference proceedings"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("pages" "Pages in the conference proceedings")
("year" "Year of publication")
("editor" "Editor1 [and Editor2 ...] [and others]")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("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")
("address" "Location of the Proceedings")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("organization" "Sponsoring organization of the conference")
("publisher" "Publishing company, its location")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))))
("Manual" . (((("title" "Title of the manual"))
(("author" "Author1 [and Author2 ...] [and others]")
("organization" "Publishing organization of the manual")
("address" "Address of the organization")
("edition" "Edition of the manual as a capitalized English word")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("year" "Year of publication")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))))
("MastersThesis" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the master\'s thesis (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("school" "School where the master\'s thesis was written")
("year" "Year of publication"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("type" "Type of the master\'s thesis (if other than \"Master\'s thesis\")")
("address" "Address of the school (if not part of field \"school\") or country")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
("Misc" . ((()
(("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the reference (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("howpublished" "The way in which the reference was published")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("year" "Year of publication")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))))
("PhdThesis" . (((("author" "Author1 [and Author2 ...] [and others]")
("title" "Title of the PhD. thesis")
("school" "School where the PhD. thesis was written")
("year" "Year of publication"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("type" "Type of the PhD. thesis")
("address" "Address of the school (if not part of field \"school\") or country")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("month" "Month of the publication as a string (remove braces)")
("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]")
("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")
("address" "Location of the Proceedings")
("month" "Month of the publication as a string (remove braces)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("organization" "Sponsoring organization of the conference")
("publisher" "Publishing company, its location")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem")))))
("TechReport" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the technical report (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("institution" "Sponsoring institution of the report")
("year" "Year of publication"))
(("type" "Type of the report (if other than \"technical report\")")
("number" "Number of the technical report")
("address" "Address of the institution (if not part of field \"institution\") or country")
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")))))
("Unpublished" . (((("author" "Author1 [and Author2 ...] [and others]")
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
("title" "Title of the unpublished reference (BibTeX converts it to lowercase)")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("note" "Remarks to be put at the end of the \\bibitem"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(("month" "Month of the publication as a string (remove braces)")
("year" "Year of publication")))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
)
"Defines reference types and their associated fields.
List of
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(ENTRY-NAME (REQUIRED OPTIONAL) (CROSSREF-REQUIRED CROSSREF-OPTIONAL))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
triples.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
If the third element is nil, the first pair is always used.
If not, the second pair is used in the case of presence of a crossref
field and the third in the case of absence.
REQUIRED, OPTIONAL, CROSSREF-REQUIRED and CROSSREF-OPTIONAL are lists.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Each element of these lists is a list of the form
(FIELD-NAME COMMENT-STRING INIT ALTERNATIVE-FLAG).
COMMENT-STRING, INIT, and ALTERNATIVE-FLAG are optional.
FIELD-NAME is the name of the field, COMMENT-STRING the comment to
appear in the echo area, INIT is either the initial content of the
field or a function, which is called to determine the initial content
of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
1997-08-22 02:23:24 +00:00
field is an alternative. ALTERNATIVE-FLAG may be t only in the
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
REQUIRED or CROSSREF-REQUIRED lists.")
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(defvar bibtex-comment-start "@Comment ")
1997-08-22 02:05:30 +00:00
(defcustom bibtex-add-entry-hook nil
"List of functions to call when entry has been inserted."
:group 'bibtex
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
:type 'hook)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-predefined-month-strings
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
'(
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
("jan") ("feb") ("mar") ("apr") ("may") ("jun")
("jul") ("aug") ("sep") ("oct") ("nov") ("dec")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Alist of month string definitions.
Should contain all strings used for months in the BibTeX style files.
1997-08-22 02:05:30 +00:00
Each element is a list with just one element: the string."
:group 'bibtex
:type '(repeat
(list string)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-predefined-strings
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(append
bibtex-predefined-month-strings
'(
("acmcs") ("acta") ("cacm") ("ibmjrd") ("ibmsj") ("ieeese")
("ieeetc") ("ieeetcad") ("ipl") ("jacm") ("jcss") ("scp")
("sicomp") ("tcs") ("tocs") ("tods") ("tog") ("toms") ("toois")
("toplas")
))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"Alist of string definitions.
1997-08-22 02:23:24 +00:00
Should contain the strings defined in the BibTeX style files. Each
1997-08-22 02:05:30 +00:00
element is a list with just one element: the string."
:group 'bibtex
:type '(repeat
(list string)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-string-files nil
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*List of BibTeX files containing string definitions.
Those files must be specified using pathnames relative to the
1997-08-22 02:23:24 +00:00
directories specified in `bibtex-string-file-path'. This variable is only
evaluated when BibTeX mode is entered (i.e., when loading the BibTeX
1997-08-22 02:05:30 +00:00
file)."
:group 'bibtex
:type '(repeat file))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defvar bibtex-string-file-path (getenv "BIBINPUTS")
1997-08-22 02:23:24 +00:00
"*Colon separated list of pathes to search for `bibtex-string-files'.")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-help-message t
"*If not nil print help messages in the echo area on entering a new field."
:group 'bibtex
:type 'boolean)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-prefix-string ""
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*String to use as a prefix for all generated keys.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for more detail."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-names 1
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Number of names to use for the automatically generated reference key.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
If this is variable is nil, all names are used.
1997-08-22 02:23:24 +00:00
Possibly more names are used according to `bibtex-autokey-names-stretch'.
See the documentation of function `bibtex-generate-autokey' for more detail."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
:type '(choice (const :tag "All" infty)
integer))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-names-stretch 0
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*Number of names that can additionally be used.
These names are used only, if all names are used then.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-additional-names ""
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*String to prepend to the generated key if not all names could be used.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defvar bibtex-autokey-transcriptions
'(
;; language specific characters
("\\\\aa" "a")
("\\\\AA" "A")
("\\\"a\\|\\\\\\\"a\\|\\\\ae" "ae")
("\\\"A\\|\\\\\\\"A\\|\\\\AE" "Ae")
("\\\\i" "i")
("\\\\j" "j")
("\\\\l" "l")
("\\\\L" "L")
("\\\"o\\|\\\\\\\"o\\|\\\\o\\|\\\\oe" "oe")
("\\\"O\\|\\\\\\\"O\\|\\\\O\\|\\\\OE" "Oe")
("\\\"s\\|\\\\\\\"s" "ss")
("\\\"u\\|\\\\\\\"u" "ue")
("\\\"U\\|\\\\\\\"U" "Ue")
;; accents
("\\\\`\\|\\\\'\\|\\\\\\^\\|\\\\~\\|\\\\=\\|\\\\\\.\\|\\\\u\\|\\\\v\\|\\\\H\\|\\\\t\\|\\\\c\\|\\\\d\\|\\\\b" "")
;; braces
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
("{" "") ("}" ""))
"Alist of (old-regexp new-string) pairs.
1997-08-22 02:23:24 +00:00
Used by the default values of `bibtex-autokey-name-change-strings' and
`bibtex-autokey-titleword-change-strings'. Defaults to translating some
language specific characters to their ASCII transcriptions, and
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
removing any character accents.")
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-name-change-strings
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-autokey-transcriptions
1997-08-22 02:23:24 +00:00
"Alist of (OLD-REGEXP NEW-STRING) pairs.
Any part of name matching a OLD-REGEXP is replaced by NEW-STRING.
Case is significant in OLD-REGEXP. All regexps are tried in the
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
order in which they appear in the list, so be sure to avoid inifinite
loops here.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(repeat
(list (regexp :tag "Old")
(string :tag "New"))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(defcustom bibtex-autokey-name-case-convert 'downcase
"*Function called for each name to perform case conversion.
See the documentation of function `bibtex-generate-autokey' for more detail."
:group 'bibtex-autokey
:type '(choice (const :tag "Preserve case" identity)
(const :tag "Downcase" downcase)
(const :tag "Capitalize" capitalize)
(const :tag "Upcase" upcase)
(function :tag "Conversion function")))
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-name-length 'infty
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Number of characters from name to incorporate into key.
If this is set to anything but a number, all characters are used.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(choice (const :tag "All" infty)
integer))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-name-separator ""
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*String that comes between any two names in the key.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-year-length 2
1998-02-08 21:05:11 +00:00
"*Number of rightmost digits from the year field to incorporate into key.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-year-use-crossref-entry t
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*If non-nil use year field from crossreferenced entry if necessary.
If this variable is non-nil and the current entry has no year, but a
valid crossref entry, the year field from the crossreferenced entry is
used.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'boolean)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titlewords 5
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Number of title words to use for the automatically generated reference key.
If this is set to anything but a number, all title words are used.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Possibly more words from the title are used according to
1997-08-22 02:23:24 +00:00
`bibtex-autokey-titlewords-stretch'.
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(choice (const :tag "All" infty)
integer))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-title-terminators
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'("\\." "!" "\\?" ":" ";" "--")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Regexp list defining the termination of the main part of the title.
Case of the regexps is ignored.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(repeat regexp))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titlewords-stretch 2
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Number of words that can additionally be used from the title.
These words are used only, if a sentence from the title can be ended then.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'integer)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(defcustom bibtex-autokey-titleword-ignore
'("A" "An" "On" "The" "Eine?" "Der" "Die" "Das"
"[^A-Z].*" ".*[^a-zA-Z0-9].*")
"*Determines words from the title that are not to be used in the key.
Each item of the list is a regexp. If a word of the title matchs a
regexp from that list, it is not included in the title part of the key.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(repeat regexp))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(defcustom bibtex-autokey-titleword-case-convert 'downcase
"*Function called for each titleword to perform case conversion.
See the documentation of function `bibtex-generate-autokey' for more detail."
:group 'bibtex-autokey
:type '(choice (const :tag "Preserve case" identity)
(const :tag "Downcase" downcase)
(const :tag "Capitalize" capitalize)
(const :tag "Upcase" upcase)
(function :tag "Conversion function")))
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titleword-abbrevs nil
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Determines exceptions to the usual abbreviation mechanism.
1997-08-22 02:23:24 +00:00
An alist of (OLD-REGEXP NEW-STRING) pairs. Case is ignored
in matching against OLD-REGEXP, and the first matching pair is used.
See the documentation of function `bibtex-generate-autokey' for details.")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titleword-change-strings
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-autokey-transcriptions
1997-08-22 02:23:24 +00:00
"Alist of (OLD-REGEXP NEW-STRING) pairs.
Any part of title word matching a OLD-REGEXP is replaced by NEW-STRING.
Case is significant in OLD-REGEXP. All regexps are tried in the
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
order in which they appear in the list, so be sure to avoid inifinite
loops here.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(repeat
(list (regexp :tag "Old")
(string :tag "New"))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titleword-length 5
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*Number of characters from title words to incorporate into key.
If this is set to anything but a number, all characters are used.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type '(choice (const :tag "All" infty)
integer))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-titleword-separator "_"
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*String to be put between the title words.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-name-year-separator ""
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*String to be put between name part and year part of key.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-year-title-separator ":_"
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"*String to be put between name part and year part of key.
1997-08-22 02:23:24 +00:00
See the documentation of function `bibtex-generate-autokey' for details."
1997-08-22 02:05:30 +00:00
:group 'bibtex-autokey
:type 'string)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-autokey-edit-before-use t
"*If non-nil, user is allowed to edit the generated key before it is used."
:group 'bibtex-autokey
:type 'boolean)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(defcustom bibtex-autokey-before-presentation-function nil
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Function to call before the generated key is presented.
If non-nil this should be a single function, which is called before
the generated key is presented (in entry or, if
`bibtex-autokey-edit-before-use' is t, in minibuffer). This function
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
must take one argument (the automatically generated key), and must
1997-08-22 02:05:30 +00:00
return with a string (the key to use)."
:group 'bibtex-autokey
:type 'function)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-entry-offset 0
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*Offset for BibTeX entries.
1997-08-22 02:05:30 +00:00
Added to the value of all other variables which determine colums."
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-field-indentation 2
"*Starting column for the name part in BibTeX fields."
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-text-indentation
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(+
bibtex-field-indentation
(length "organization = "))
"*Starting column for the text part in BibTeX fields.
1997-08-22 02:05:30 +00:00
Should be equal to the space needed for the longest name part."
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-contline-indentation
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(+ bibtex-text-indentation 1)
1997-08-22 02:05:30 +00:00
"*Starting column for continuation lines of BibTeX fields."
:group 'bibtex
:type 'integer)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
1997-08-22 02:05:30 +00:00
(defcustom bibtex-align-at-equal-sign nil
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"*If non-nil, align fields at equal sign instead of field text.
1997-08-22 02:23:24 +00:00
If non-nil, the column for the equal sign is
the value of `bibtex-text-indentation', minus 2."
1997-08-22 02:05:30 +00:00
:group 'bibtex
:type 'boolean)
(defcustom bibtex-comma-after-last-field nil
"*If non-nil, a comma is put at end of last field in the entry template."
:group 'bibtex
:type 'boolean)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
;; bibtex-font-lock-keywords is a user option as well, but since the
;; patterns used to define this variable are defined in a later
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; section of this file, it is defined later.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; Special support taking care of variants
(if (boundp 'mark-active)
(defun bibtex-mark-active ()
;; In Emacs mark-active indicates if mark is active.
mark-active)
(defun bibtex-mark-active ()
;; In XEmacs (mark) returns nil when not active.
(if zmacs-regions (mark) (mark t))))
(if (fboundp 'run-with-idle-timer)
;; timer.el is distributed with Emacs
(fset 'bibtex-run-with-idle-timer 'run-with-idle-timer)
;; timer.el is not distributed with XEmacs
;; Notice that this does not (yet) pass the arguments, but they
;; are not used (yet) in bibtex.el. Fix if needed.
(defun bibtex-run-with-idle-timer (secs repeat function &rest args)
(start-itimer "bibtex" function secs (if repeat secs nil) t)))
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Syntax Table, Keybindings and BibTeX Entry List
(defvar bibtex-mode-syntax-table
(let ((st (make-syntax-table)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(modify-syntax-entry ?\" "\"" st)
(modify-syntax-entry ?$ "$$ " st)
(modify-syntax-entry ?% "< " st)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(modify-syntax-entry ?' "w " st)
(modify-syntax-entry ?@ "w " st)
(modify-syntax-entry ?\\ "\\" st)
(modify-syntax-entry ?\f "> " st)
(modify-syntax-entry ?\n "> " st)
(modify-syntax-entry ?~ " " st)
st))
(defvar bibtex-mode-map
(let ((km (make-sparse-keymap)))
(define-key km "\t" 'bibtex-find-text)
(define-key km "\n" 'bibtex-next-field)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\M-\t" 'bibtex-complete-string)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(define-key km [(meta tab)] 'bibtex-complete-key)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\"" 'bibtex-remove-delimiters)
(define-key km "\C-c{" 'bibtex-remove-delimiters)
(define-key km "\C-c}" 'bibtex-remove-delimiters)
(define-key km "\C-c\C-c" 'bibtex-clean-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\C-q" 'bibtex-fill-entry)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c?" 'bibtex-print-help-message)
(define-key km "\C-c\C-p" 'bibtex-pop-previous)
(define-key km "\C-c\C-n" 'bibtex-pop-next)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\C-k" 'bibtex-kill-field)
(define-key km "\C-c\M-k" 'bibtex-copy-field-as-kill)
(define-key km "\C-c\C-w" 'bibtex-kill-entry)
(define-key km "\C-c\M-w" 'bibtex-copy-entry-as-kill)
(define-key km "\C-c\C-y" 'bibtex-yank)
(define-key km "\C-c\M-y" 'bibtex-yank-pop)
(define-key km "\C-c\C-d" 'bibtex-empty-field)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\C-f" 'bibtex-make-field)
(define-key km "\C-c$" 'bibtex-ispell-abstract)
(define-key km "\M-\C-a" 'bibtex-beginning-of-entry)
(define-key km "\M-\C-e" 'bibtex-end-of-entry)
(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)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-rn" 'bibtex-narrow-to-entry)
(define-key km "\C-c\C-rw" 'widen)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\C-o" 'bibtex-remove-OPT-or-ALT)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-e\C-i" 'bibtex-InProceedings)
(define-key km "\C-c\C-ei" 'bibtex-InCollection)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-eI" 'bibtex-InBook)
(define-key km "\C-c\C-e\C-a" 'bibtex-Article)
(define-key km "\C-c\C-e\C-b" 'bibtex-InBook)
(define-key km "\C-c\C-eb" 'bibtex-Book)
(define-key km "\C-c\C-eB" 'bibtex-Booklet)
(define-key km "\C-c\C-e\C-c" 'bibtex-InCollection)
(define-key km "\C-c\C-e\C-m" 'bibtex-Manual)
(define-key km "\C-c\C-em" 'bibtex-MastersThesis)
(define-key km "\C-c\C-eM" 'bibtex-Misc)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-e\C-p" 'bibtex-InProceedings)
(define-key km "\C-c\C-ep" 'bibtex-Proceedings)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-eP" 'bibtex-PhdThesis)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(define-key km "\C-c\C-e\M-p" 'bibtex-Preamble)
(define-key km "\C-c\C-e\C-s" 'bibtex-String)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(define-key km "\C-c\C-e\C-t" 'bibtex-TechReport)
(define-key km "\C-c\C-e\C-u" 'bibtex-Unpublished)
km))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(easy-menu-define
bibtex-edit-menu bibtex-mode-map "BibTeX-Edit Menu in BibTeX mode"
'("BibTeX-Edit"
("Moving inside an Entry"
["End of Field" bibtex-find-text t]
["Next Field" bibtex-next-field t]
["Beginning of Entry" bibtex-beginning-of-entry t]
["End of Entry" bibtex-end-of-entry t])
("Operating on Current Entry"
["Fill Entry" bibtex-fill-entry t]
["Clean Entry" bibtex-clean-entry t]
"--"
["Kill Entry" bibtex-kill-entry t]
["Copy Entry to Kill Ring" bibtex-copy-entry-as-kill t]
["Paste Most Recently Killed Entry" bibtex-yank t]
["Paste Previously Killed Entry" bibtex-yank-pop t]
"--"
["Ispell Entry" bibtex-ispell-entry t]
["Ispell Entry Abstract" bibtex-ispell-abstract t]
["Narrow to Entry" bibtex-narrow-to-entry t])
("Operating on Current Field"
["Remove Delimiters" bibtex-remove-delimiters t]
["Remove OPT or ALT Prefix" bibtex-remove-OPT-or-ALT t]
["Clear Field" bibtex-empty-field t]
"--"
["Kill Field" bibtex-kill-field t]
["Copy Field to Kill Ring" bibtex-copy-field-as-kill t]
["Paste Most Recently Killed Field" bibtex-yank t]
["Paste Previously Killed Field" bibtex-yank-pop t]
"--"
["Make New Field" bibtex-make-field t]
"--"
["Snatch from Similar Following Field" bibtex-pop-next t]
["Snatch from Similar Preceding Field" bibtex-pop-previous t]
"--"
["String Complete" bibtex-complete-string t]
["Key Complete" bibtex-complete-key t]
"--"
["Help about Current Field" bibtex-print-help-message t])
("Operating on Buffer or Region"
["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]
["Submit Bug Report" bibtex-submit-bug-report t])))
(easy-menu-define
bibtex-entry-menu bibtex-mode-map "Entry-Types Menu in BibTeX mode"
(list "Entry-Types"
["Article in Journal" bibtex-Article t]
["Article in Conference Proceedings" bibtex-InProceedings t]
["Article in a Collection" bibtex-InCollection t]
["Chapter or Pages in a Book" bibtex-InBook t]
["Conference Proceedings" bibtex-Proceedings t]
["Book" bibtex-Book t]
["Booklet (Bound, but no Publisher/Institution)" bibtex-Booklet t]
["PhD. Thesis" bibtex-PhdThesis t]
["Master's Thesis" bibtex-MastersThesis t]
["Technical Report" bibtex-TechReport t]
["Technical Manual" bibtex-Manual t]
["Unpublished" bibtex-Unpublished t]
["Miscellaneous" bibtex-Misc t]
["String" bibtex-String t]
["Preamble" bibtex-Preamble t]))
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
;; Bug Reporting
(defconst
bibtex-maintainer-address "Dirk Herrmann <D.Herrmann@tu-bs.de>")
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
;; current maintainer
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Internal Variables
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defvar bibtex-pop-previous-search-point nil)
;; Next point where bibtex-pop-previous starts looking for a similar
;; entry.
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defvar bibtex-pop-next-search-point nil)
;; Next point where bibtex-pop-next starts looking for a similar entry.
1991-05-09 21:50:45 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defvar bibtex-field-kill-ring nil)
;; Ring of least recently killed fields. At most
;; bibtex-field-kill-ring-max items are kept here.
(defvar bibtex-field-kill-ring-yank-pointer nil)
;; The tail of bibtex-field-kill-ring whose car is the last item yanked.
(defvar bibtex-entry-kill-ring nil)
;; Ring of least recently killed entries. At most
;; bibtex-entry-kill-ring-max items are kept here.
(defvar bibtex-entry-kill-ring-yank-pointer nil)
;; The tail of bibtex-entry-kill-ring whose car is the last item yanked.
(defvar bibtex-last-kill-command nil)
;; Holds the type of the last kill command (either 'field or 'entry)
(defvar bibtex-strings nil)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Candidates for bibtex-complete-string. Initialized from
;; bibtex-predefined-strings and bibtex-string-files. This variable is
;; buffer-local.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(make-variable-buffer-local 'bibtex-strings)
1991-05-09 21:50:45 +00:00
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(defvar bibtex-keys nil)
;; Candidates for TAB completion when entering a reference key using
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; the minibuffer. Also used for bibtex-complete-key. Initialized in
;; bibtex-mode and updated for each new entry. This variable is
;; buffer-local.
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(make-variable-buffer-local 'bibtex-keys)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defvar bibtex-buffer-last-parsed-tick nil)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
;; Remembers the value returned by buffer-modified-tick when buffer
;; was parsed for keys the last time.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(make-variable-buffer-local 'bibtex-buffer-last-parsed-tick)
(defvar bibtex-parse-idle-timer nil)
;; Stores if timer is already installed
(defvar bibtex-progress-lastperc nil)
;; Holds the last reported percentage for the progress message
(defvar bibtex-progress-lastmes nil)
;; Holds the last reported progress message
(defvar bibtex-progress-interval nil)
;; Holds the chosen interval
(defvar bibtex-key-history nil)
;; Used to store the history list for reading keys
(defvar bibtex-entry-type-history nil)
;; Used to store the history list for reading entry types
(defvar bibtex-field-history nil)
;; Used to store the history list for reading field names
(defvar bibtex-reformat-previous-options nil)
;; Used to store the last reformat options given
(defvar bibtex-reformat-previous-labels nil)
;; Used to store the last reformat label option given
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Functions to Parse the BibTeX Entries
1991-05-09 21:50:45 +00:00
(defun bibtex-cfield (name text)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Create a regexp for a BibTeX field of name NAME and text TEXT.
1991-05-09 21:50:45 +00:00
(concat ",[ \t\n]*\\("
name
"\\)[ \t\n]*=[ \t\n]*\\("
text
"\\)"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defconst bibtex-name-in-cfield 1)
;; The regexp subexpression number of the name part in bibtex-cfield.
(defconst bibtex-text-in-cfield 2)
;; The regexp subexpression number of the text part in bibtex-cfield.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defconst bibtex-reference-type "@[^\"#%'(),={} \t\n0-9][^\"#%'(),={} \t\n]*")
;; Regexp defining the type part of a BibTeX reference entry (almost
;; the same as bibtex-field-name)
(defconst bibtex-reference-key "[][a-z0-9.:;?!`'/*@+=|()<>&_^$-]+")
;; Regexp defining the label part of a BibTeX reference entry
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(defconst bibtex-field-name "[^\"#%'(),={} \t\n0-9][^\"#%'(),={} \t\n]*")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; Regexp defining the name part of a BibTeX field (almost the same as
;; bibtex-reference-type)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defconst bibtex-field-const "[][a-z0-9.:;?!`'/*@+=|<>&_^$-]+")
;; Regexp defining a bibtex field constant
1992-02-22 21:47:46 +00:00
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(defconst bibtex-field-string-part-not-braced
"[^{}]")
;; Match field string part without braces
(defconst bibtex-field-string-part-no-inner-braces
(concat
"{"
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-field-string-part-not-braced "*"
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"}"))
;; Match field string part with no inner braces
(defconst bibtex-field-string-part-1-inner-brace
1991-05-09 21:50:45 +00:00
(concat
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"{"
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"\\("
bibtex-field-string-part-not-braced
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\|"
"\\(" bibtex-field-string-part-no-inner-braces "\\)"
"\\)*"
"}"))
;; Match field string part with at most 1 inner brace
(defconst bibtex-field-string-part-2-inner-braces
(concat
"{"
"\\("
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-field-string-part-not-braced
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\|"
"\\(" bibtex-field-string-part-1-inner-brace "\\)"
"\\)*"
"}"))
;; Match field string part with at most 2 inner braces
(defconst bibtex-field-string-part-3-inner-braces
(concat
"{"
"\\("
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-field-string-part-not-braced
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\|"
"\\(" bibtex-field-string-part-2-inner-braces "\\)"
"\\)*"
"}"))
;; Match field string part with at most 3 inner braces
(defconst bibtex-field-string-braced
bibtex-field-string-part-3-inner-braces)
;; Match braced field string with inner nesting level of braces at most 3
(defconst bibtex-field-string-quoted
(concat
"\""
"\\("
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"[^\"\\]" ;; every character except quote or backslash
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\|"
;; "\\(" "\"[a-z-]" "\\)" ;; a quote followed by a letter or dash
;; "\\|"
;; last two lines commented out until lines like
;; author = "Stefan Sch"of"
;; are supported by BibTeX
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"\\(" "\\\\\\(.\\|\n\\)" "\\)" ;; a backslash followed by any character
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\)*"
"\""))
;; Match quoted field string
(defconst bibtex-field-string
(concat
"\\(" bibtex-field-string-braced "\\)"
"\\|"
"\\(" bibtex-field-string-quoted "\\)"))
;; Match a braced or quoted string
1992-07-16 21:47:34 +00:00
1991-05-09 21:50:45 +00:00
(defconst bibtex-field-string-or-const
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(concat bibtex-field-const "\\|" bibtex-field-string))
;; Match either bibtex-field-string or bibtex-field-const.
1991-05-09 21:50:45 +00:00
(defconst bibtex-field-text
(concat
"\\(" bibtex-field-string-or-const "\\)"
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
"\\([ \t\n]+#[ \t\n]+\\(" bibtex-field-string-or-const "\\)\\)*"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Regexp defining the text part of a BibTeX field: either a string,
;; or an empty string, or a constant followed by one or more # /
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
;; constant pairs.
1991-05-09 21:50:45 +00:00
(defconst bibtex-field
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-cfield bibtex-field-name bibtex-field-text))
;; Regexp defining the format of a BibTeX field.
(defconst bibtex-name-in-field bibtex-name-in-cfield)
;; The regexp subexpression number of the name part in BibTeX-field.
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defconst bibtex-text-in-field bibtex-text-in-cfield)
;; The regexp subexpression number of the text part in BibTeX-field.
1991-05-09 21:50:45 +00:00
(defconst bibtex-reference-head
(concat "^[ \t]*\\("
1991-05-09 21:50:45 +00:00
bibtex-reference-type
"\\)[ \t]*[({][ \t\n]*\\("
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
bibtex-reference-key
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"\\)"))
;; Regexp defining format of the header line of a BibTeX reference
;; entry.
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(defconst bibtex-reference-maybe-empty-head
(concat bibtex-reference-head "?"))
;; Regexp defining format of the header line of a maybe empty
;; BibTeX reference entry (without reference key).
(defconst bibtex-type-in-head 1)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; The regexp subexpression number of the type part in
;; bibtex-reference-head.
(defconst bibtex-key-in-head 2)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; The regexp subexpression number of the key part in
;; bibtex-reference-head.
1991-05-09 21:50:45 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defconst bibtex-reference-infix (concat "[ \t\n]*" bibtex-field))
;; Regexp defining the (repeatable) infix of a bibtex reference
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defconst bibtex-reference-postfix "[ \t\n]*,?[ \t\n]*[})]")
;; Regexp defining the postfix of a bibtex reference
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defconst bibtex-key-in-reference bibtex-key-in-head)
;; The regexp subexpression number of the key part in
;; bibtex-reference.
1991-05-09 21:50:45 +00:00
(defconst bibtex-string
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(concat "^[ \t]*@string[ \t\n]*[({][ \t\n]*\\("
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
bibtex-reference-key
1991-05-09 21:50:45 +00:00
"\\)[ \t\n]*=[ \t\n]*\\("
bibtex-field-text
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"\\)[ \t\n]*[})]"))
;; Regexp defining the format of a BibTeX string entry.
1991-05-09 21:50:45 +00:00
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(defconst bibtex-key-in-string 1)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; The regexp subexpression of the name part in bibtex-string.
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defconst bibtex-text-in-string 2)
;; The regexp subexpression of the text part in bibtex-string.
1991-05-09 21:50:45 +00:00
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(defvar bibtex-font-lock-keywords
(list
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; reference type and reference label
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(list bibtex-reference-maybe-empty-head
(list bibtex-type-in-head 'font-lock-function-name-face)
(list bibtex-key-in-head 'font-lock-constant-face nil t))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; comments
(list
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(concat "^\\([ \t]*" bibtex-comment-start ".*\\)$")
1 'font-lock-comment-face)
;; optional field names (treated as comments)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(list
(concat "^[ \t]*\\(OPT" bibtex-field-name "\\)[ \t]*=")
1 'font-lock-comment-face)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; field names
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(list (concat "^[ \t]*\\(" bibtex-field-name "\\)[ \t]*=")
1 'font-lock-variable-name-face)
"*Default expressions to highlight in BibTeX mode."))
;; now all needed patterns are defined
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Helper Functions
1992-07-16 21:47:34 +00:00
(defun bibtex-delete-whitespace ()
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; Delete all whitespace starting at point
(if (looking-at "[ \t\n]+")
(delete-region (point) (match-end 0))))
(defun bibtex-current-line ()
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; this computes line number of point regardless whether the buffer
;; is narrowed
(+ (count-lines 1 (point))
(if (equal (current-column) 0) 1 0)))
(defun bibtex-member-of-regexp (string list)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Return non-nil if STRING is exactly matched by an element of
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; LIST. The value is actually the tail of LIST whose
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; car matches STRING.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(let (case-fold-search)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(while
(and list (not (string-match (concat "^" (car list) "$") string)))
(setq list (cdr list)))
list))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-assoc-of-regexp (string alist)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Return non-nil if STRING is exactly matched by the car of an
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; element of LIST (case ignored). The value is actually the element
;; of LIST whose car matches STRING.
(let ((case-fold-search t))
(while
(and alist
(not (string-match (concat "^" (car (car alist)) "$") string)))
(setq alist (cdr alist)))
(car alist)))
(defun bibtex-skip-to-valid-entry (&optional backward)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; If not at beginning of valid BibTeX entry, move to beginning of
;; the next valid one. With argument backward non-nil, move backward
;; to beginning of previous valid one. A valid entry is a
;; syntactical correct one with type contained in
;; bibtex-entry-field-alist or, if bibtex-sort-ignore-string-entries
;; is nil, a syntactical correct string entry.
(let ((case-fold-search t)
(valid-bibtex-entry
(concat
"@[ \t]*\\("
(mapconcat
(lambda (type)
(concat "\\(" (car type) "\\)"))
bibtex-entry-field-alist
"\\|")
"\\)"))
found)
(while (and (not found)
(not (if backward
(bobp)
(eobp))))
(let ((pnt (point)))
(cond
((looking-at valid-bibtex-entry)
(if (and
(bibtex-search-reference nil nil t)
(equal (match-beginning 0) pnt))
(setq found t)))
((and (not bibtex-sort-ignore-string-entries)
(looking-at bibtex-string))
(setq found t)))
(if found
(goto-char pnt)
(if backward
(progn
(goto-char (1- pnt))
(if (re-search-backward "^[ \t]*\\(@\\)" nil 'move)
(goto-char (match-beginning 1))))
(goto-char (1+ pnt))
(if (re-search-forward "^[ \t]*@" nil 'move)
(forward-char -1))))))))
(defun bibtex-map-entries (fun)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Call FUN for each BibTeX entry starting with the current. Do this
;; to the end of the file. FUN is called with one argument, the key
;; of the entry, and with point inside the entry. If
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; bibtex-sort-ignore-string-entries is non-nil, FUN will not be
;; called for @String entries.
(let ((case-fold-search t))
(bibtex-beginning-of-entry)
(while (re-search-forward bibtex-reference-maybe-empty-head nil t)
(let ((pnt (point))
(reference-type
(downcase (buffer-substring-no-properties
(1+ (match-beginning bibtex-type-in-head))
(match-end bibtex-type-in-head))))
(reference-key
(if (match-beginning bibtex-key-in-head)
(buffer-substring-no-properties
(match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head))
"")))
(if (or
(and
(not bibtex-sort-ignore-string-entries)
(string-equal "string" (downcase reference-type)))
(assoc-ignore-case reference-type bibtex-entry-field-alist))
(funcall fun reference-key))
(goto-char pnt)
(bibtex-end-of-entry)))))
(defun bibtex-progress-message (&optional flag interval)
;; echos a message about progress of current buffer
;; if flag is a string, the message is initialized (in this case a
;; value for INTERVAL may be given as well (if not this is set to 5))
;; if flag is done, the message is deinitialized
;; if flag is absent, a message is echoed if point was incremented
;; at least INTERVAL percent since last message was echoed
(let* ((size (- (point-max) (point-min)))
(perc (if (= size 0)
100
(/ (* 100 (- (point) (point-min))) size))))
(if (or (and (not flag)
(>= perc
(+ bibtex-progress-interval bibtex-progress-lastperc)))
(stringp flag))
(progn
(if (stringp flag)
(progn
(setq bibtex-progress-lastmes flag)
(if interval
(setq bibtex-progress-interval interval)
(setq bibtex-progress-interval 5))))
(setq bibtex-progress-lastperc perc)
(message (concat bibtex-progress-lastmes " (%d%%)") perc))
(if (equal flag 'done)
(progn
(message (concat bibtex-progress-lastmes " (done)"))
(setq bibtex-progress-lastmes nil))))))
(defun bibtex-field-left-delimiter ()
;; returns a string dependent on bibtex-field-delimiters
(if (equal bibtex-field-delimiters 'braces)
"{"
"\""))
(defun bibtex-field-right-delimiter ()
;; returns a string dependent on bibtex-field-delimiters
(if (equal bibtex-field-delimiters 'braces)
"}"
"\""))
(defun bibtex-entry-left-delimiter ()
;; returns a string dependent on bibtex-field-delimiters
(if (equal bibtex-entry-delimiters 'braces)
"{"
"("))
(defun bibtex-entry-right-delimiter ()
;; returns a string dependent on bibtex-field-delimiters
(if (equal bibtex-entry-delimiters 'braces)
"}"
")"))
(defun bibtex-search-reference
(empty-head &optional bound noerror backward)
;; A helper function necessary since the failure stack size limit for
;; regexps was reduced in emacs 19.32.
;; It searches for a BibTeX reference (maybe with an empty head if
;; EMPTY-HEAD is t).
;; BOUND and NOERROR are exactly as in re-search-forward. If
;; BACKWARD is non-nil, search is done in reverse direction. After
;; call to this function MATCH-BEGINNING and MATCH-END functions are
;; defined, but only for the head part of the reference (especially
;; (match-end 0) just gives the end of the head part).
(let ((pnt (point))
(prefix (if empty-head
bibtex-reference-maybe-empty-head
bibtex-reference-head))
(infix bibtex-reference-infix)
(postfix bibtex-reference-postfix))
(if backward
(let (found)
(while (and (not found)
(re-search-backward prefix bound noerror))
(setq found (bibtex-search-reference empty-head pnt t)))
(if found
(goto-char (match-beginning 0))
(if (equal noerror nil)
;; yell
(error "Search of BibTeX reference failed"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (equal noerror t)
;; don't move
(goto-char pnt))
nil))
(let ((limit (if bound bound (point-max)))
md
found)
(while (and (not found)
(re-search-forward prefix bound noerror))
(setq md (match-data))
;; save match-data of prefix regexp
(let ((entry-closer
(if (save-excursion
(goto-char (match-end bibtex-type-in-head))
(looking-at "[ \t]*("))
;; entry opened with parenthesis
")"
"}")))
(while (and
(looking-at infix)
(<= (match-end 0) limit))
(goto-char (match-end 0)))
;; This matches the infix* part. The AND construction assures
;; that BOUND is respected.
(if (and (looking-at postfix)
(string-equal
(buffer-substring-no-properties
(1- (match-end 0)) (match-end 0))
entry-closer)
(<= (match-end 0) limit))
(progn
(re-search-forward postfix)
(setq found t)))))
(if found
(progn
(set-match-data md)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; to set match-beginning/end again
(point))
(if (equal noerror nil)
;; yell
(error "Search of BibTeX reference failed"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (equal noerror t)
;; don't move
(goto-char pnt))
nil)))))
1992-07-16 21:47:34 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-flash-head ()
;; Flash at BibTeX reference head before point, if exists.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t)
flash)
(cond ((re-search-backward bibtex-reference-head nil t)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(goto-char (match-beginning bibtex-type-in-head))
(setq flash (match-end bibtex-key-in-reference)))
(t
(end-of-line)
(skip-chars-backward " \t")
(setq flash (point))
(beginning-of-line)
(skip-chars-forward " \t")))
(if (pos-visible-in-window-p (point))
(sit-for 1)
(message "From: %s"
(buffer-substring (point) flash)))))
1992-07-16 21:47:34 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-make-optional-field (e-t)
"Makes an optional field named E-T in current BibTeX entry."
(if (consp e-t)
(bibtex-make-field (cons (concat "OPT" (car e-t)) (cdr e-t)))
(bibtex-make-field (concat "OPT" e-t))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-move-outside-of-entry ()
;; Make sure we are outside of a BibTeX entry.
(let ((orig-point (point)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(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
;; at the beginning of a paragraph.
(progn
(goto-char orig-point)
(beginning-of-line 1)
(if (not (= ?\n (char-before (1- (point)))))
(progn
(re-search-forward "^[ \t]*[@\n]" nil 'move)
(backward-char 1)))))
(skip-chars-forward " \t\n")))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-beginning-of-first-entry ()
;; Go to the beginning of the first BibTeX entry in buffer. Return
;; point.
1992-07-16 21:47:34 +00:00
(goto-char (point-min))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (re-search-forward "^[ \t]*@" nil 'move)
(beginning-of-line))
(point))
(defun bibtex-beginning-of-last-entry ()
;; Go to the beginning of the last BibTeX entry in buffer.
(goto-char (point-max))
(if (re-search-backward "^[ \t]*@" nil 'move)
(beginning-of-line))
(point))
1992-07-16 21:47:34 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-inside-field ()
;; Try to avoid point being at end of a BibTeX field.
(end-of-line)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(skip-chars-backward " \t")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(cond ((= (preceding-char) ?,)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(forward-char -2)))
(cond ((or
(= (preceding-char) ?})
(= (preceding-char) ?\"))
(forward-char -1))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-enclosing-field (&optional noerr)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; Search for BibTeX field enclosing point. Point moves to end of
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; field. Use match-beginning and match-end to parse the field. If
;; NOERR is non-nil, no error is signalled. In this case, t is
;; returned on success, nil otherwise.
(let ((case-fold-search t)
(old-point (point))
(boe (bibtex-beginning-of-entry))
(success t))
(goto-char old-point)
(if (not (re-search-backward
(bibtex-cfield bibtex-field-name "")
boe t))
;; Search possible beginning of field
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char old-point)
(if noerr
(setq success nil)
(error "Can't find enclosing BibTeX field")))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (or (not (re-search-forward bibtex-field nil t))
(< (match-end 0) old-point)
(> (match-beginning 0) old-point))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char old-point)
(if noerr
(setq success nil)
(error "Can't find enclosing BibTeX field")))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
success))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(defun bibtex-enclosing-reference-maybe-empty-head ()
;; Search for BibTeX reference enclosing point. Point moves to
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; end of reference. Beginning (but not end) of reference is given
;; by (match-beginning 0).
(let ((case-fold-search t)
(old-point (point)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(if (not
(re-search-backward
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-reference-maybe-empty-head nil t))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(progn
(error "Can't find enclosing BibTeX reference")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(goto-char old-point)))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(goto-char (match-beginning bibtex-type-in-head))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not
(bibtex-search-reference t nil t))
(progn
(error "Can't find enclosing BibTeX reference")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char old-point)))))
(defun bibtex-insert-current-kill (n)
(if (not bibtex-last-kill-command)
(error "BibTeX kill ring is empty")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let* ((kr (if (equal bibtex-last-kill-command 'field)
'bibtex-field-kill-ring
'bibtex-entry-kill-ring))
(kryp (if (equal bibtex-last-kill-command 'field)
'bibtex-field-kill-ring-yank-pointer
'bibtex-entry-kill-ring-yank-pointer))
(ARGth-kill-element
(nthcdr
(mod (- n (length (eval kryp))) (length (eval kr)))
(eval kr)))
(current (car (set kryp ARGth-kill-element))))
(cond
((equal bibtex-last-kill-command 'field)
(let (bibtex-help-message)
(bibtex-find-text nil t)
(if (looking-at "[}\"]")
(forward-char)))
(set-mark (point))
(message "Mark set")
(bibtex-make-field (list (elt current 1) nil (elt current 2)) t))
((equal bibtex-last-kill-command 'entry)
(if (not (eobp))
(bibtex-beginning-of-entry))
(set-mark (point))
(message "Mark set")
(insert (elt current 1)))
(t
(error
"Unknown tag field: %s. Please submit a bug report"
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-last-kill-command))))))
(defun bibtex-format-entry ()
;; Helper function for bibtex-clean-entry. Formats current entry
;; according to variable bibtex-entry-format.
(let ((case-fold-search t)
(beg (point))
(start (bibtex-beginning-of-entry))
crossref-there
alternatives-there
non-empty-alternative)
(let ((end (copy-marker (bibtex-end-of-entry))))
(if (equal start (marker-position end))
(error "Not on a known BibTeX entry")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char start)
(while (re-search-forward bibtex-field end t)
;; determine if reference has crossref entry and if at least
;; one alternative is non-empty
(let ((begin-name (match-beginning bibtex-name-in-field))
(end-name (match-end bibtex-name-in-field))
(begin-text (match-beginning bibtex-text-in-field))
(end-text (match-end bibtex-text-in-field)))
(goto-char begin-name)
(if (looking-at "ALT")
(progn
(setq alternatives-there t)
(goto-char begin-text)
(if (not (looking-at "\\(\"\"\\)\\|\\({}\\)"))
(setq non-empty-alternative t))))
(if (string-match
"\\(OPT\\)?crossref"
(buffer-substring-no-properties begin-name end-name))
(progn
(setq
crossref-there
(buffer-substring-no-properties
(1+ begin-text) (1- end-text)))
(if (equal crossref-there "")
(setq crossref-there nil))))))
(if (and alternatives-there
(not non-empty-alternative))
(progn
(goto-char beg)
(error "All alternatives are empty")))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char start)
(re-search-forward bibtex-reference-type end)
(let* ((begin-type (1+ (match-beginning 0)))
(end-type (match-end 0))
(reference-type
(downcase
(buffer-substring-no-properties begin-type end-type)))
(entry-list
(assoc-ignore-case reference-type bibtex-entry-field-alist))
(req (elt (elt entry-list 1) 0))
(creq (elt (elt entry-list 2) 0))
(format (if (equal bibtex-entry-format t)
'(realign opts-or-alts numerical-fields
last-comma page-dashes delimiters
unify-case inherit-booktitle)
bibtex-entry-format))
field-done)
(if (memq 'unify-case format)
(progn
(delete-region begin-type end-type)
(insert (car entry-list))))
(if (memq 'delimiters format)
(progn
(goto-char end-type)
(skip-chars-forward " \t\n")
(delete-char 1)
(insert (bibtex-entry-left-delimiter))))
(goto-char start)
(while (re-search-forward bibtex-field end t)
(let* ((begin-field
(copy-marker (match-beginning 0)))
(end-field
(copy-marker (match-end 0)))
(begin-name
(copy-marker (match-beginning bibtex-name-in-field)))
(end-name
(copy-marker (match-end bibtex-name-in-field)))
(begin-text
(copy-marker (match-beginning bibtex-text-in-field)))
(end-text
(copy-marker (match-end bibtex-text-in-field)))
(field-name
(buffer-substring-no-properties
(if (string-match
"^OPT\\|ALT$"
(buffer-substring-no-properties
begin-name (+ begin-name 3)))
(+ begin-name 3)
begin-name)
end-name)))
(cond
((and
(memq 'opts-or-alts format)
(progn (goto-char begin-name)
(looking-at "OPT\\|ALT")))
(goto-char begin-text)
(if (looking-at "\\(\"\"\\)\\|\\({}\\)")
;; empty: delete whole field if really optional
;; (missing crossref handled) or complain
(if (and
(progn
(goto-char begin-name)
(looking-at "OPT"))
(not crossref-there)
(assoc-ignore-case field-name req))
;; field is not really optional
(progn
(goto-char begin-name)
(bibtex-remove-OPT-or-ALT)
(error
"Mandatory field ``%s'' is empty" field-name))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; field is optional
(delete-region begin-field end-field))
;; otherwise: not empty, delete "OPT"
(goto-char begin-name)
(bibtex-remove-OPT-or-ALT)))
((and
(memq 'numerical-fields format)
(progn
(goto-char begin-text)
(looking-at "\\(\"[0-9]+\"\\)\\|\\({[0-9]+}\\)")))
(goto-char end-text)
(delete-char -1)
(goto-char begin-text)
(delete-char 1))
(t
(if (memq 'delimiters format)
(progn
(goto-char begin-text)
(while (and
(<= (point) end-text)
(re-search-forward
bibtex-field-string-or-const end-text t))
(let ((end (point)))
(goto-char (match-beginning 0))
(if (or
(and
(equal bibtex-field-delimiters 'double-quotes)
(looking-at bibtex-field-string-braced))
(and
(equal bibtex-field-delimiters 'braces)
(looking-at bibtex-field-string-quoted)))
(progn
(goto-char (match-end 0))
(delete-backward-char 1)
(insert (bibtex-field-right-delimiter))
(goto-char (match-beginning 0))
(delete-char 1)
(insert (bibtex-field-left-delimiter))))
(goto-char end)))))
(if (and
(memq 'page-dashes format)
(string-match "^\\(OPT\\)?pages$" (downcase field-name))
(progn
(goto-char begin-text)
(looking-at
"\\([\"{][0-9]+\\)[ \t\n]*--?[ \t\n]*\\([0-9]+[\"}]\\)")))
(replace-match "\\1-\\2"))
(if (and
(memq 'inherit-booktitle format)
(equal (downcase field-name) "booktitle")
(progn
(goto-char begin-text)
(looking-at "\\(\"\"\\)\\|\\({}\\)"))
crossref-there
(not (bibtex-find-entry-location crossref-there t)))
;; booktitle field empty and crossref entry found
;; --> insert title field of crossreferenced entry if there
(let ((end-of-crefd-entry (bibtex-end-of-entry)))
(bibtex-beginning-of-entry)
(if (re-search-forward
(bibtex-cfield "title" bibtex-field-text)
end-of-crefd-entry t)
(progn
(goto-char begin-text)
(forward-char)
(insert
(buffer-substring-no-properties
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(1+ (match-beginning bibtex-text-in-field))
(1- (match-end bibtex-text-in-field))))))))
(if (progn
(goto-char begin-text)
(looking-at "\\(\"\"\\)\\|\\({}\\)"))
;; if empty field, complain
(progn
(forward-char)
(if (or (and
crossref-there
(assoc-ignore-case
field-name creq))
(and
(not crossref-there)
(assoc-ignore-case
field-name req)))
(error
"Mandatory field ``%s'' is empty" field-name))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (memq 'unify-case format)
(let* ((fl
(car (cdr (assoc-ignore-case
reference-type
bibtex-entry-field-alist))))
(field-list
(append
(elt fl 0)
(elt fl 1)
bibtex-user-optional-fields))
(new-field-name
(car
(assoc-ignore-case field-name field-list))))
(goto-char begin-name)
(if new-field-name
(progn
(delete-region begin-name end-name)
(insert new-field-name))
(downcase-region begin-name end-name))))
(setq field-done t)))
(if (not field-done)
(goto-char begin-field)
(setq field-done nil)
(goto-char end-field))))
(if (looking-at (bibtex-field-right-delimiter))
(forward-char))
(if (memq 'last-comma format)
(cond ((and
bibtex-comma-after-last-field
(not (looking-at ",")))
(insert ","))
((and
(not bibtex-comma-after-last-field)
(looking-at ","))
(delete-char 1))))
(if (looking-at ",")
(forward-char))
(if (memq 'delimiters format)
(progn
(skip-chars-forward " \t\n")
(delete-char 1)
(insert (bibtex-entry-right-delimiter))))
(if (memq 'realign format)
(bibtex-fill-entry)))))))
1992-07-16 21:47:34 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-autokey-change (string change-list)
;; Returns a string where some regexps are changed according to
;; change-list. Every item of change-list is an (old-regexp
;; new-string) pair.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let (case-fold-search
(return-string string)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(index 0)
(len (length change-list))
change-item)
(while (< index len)
(setq change-item (elt change-list index))
(while (string-match (car change-item) return-string)
(setq
return-string
(concat (substring return-string 0 (match-beginning 0))
(elt change-item 1)
(substring return-string (match-end 0)))))
(setq index (1+ index)))
return-string))
(defun bibtex-autokey-abbrev (string len)
;; Returns an abbreviation of string with at least len
;; characters. String is aborted only after a consonant or at the
;; word end. If len is not a number, string is returned unchanged.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(cond ((or
(not (numberp len))
(<= (length string) len))
string)
((equal len 0)
"")
(t
(let* ((case-fold-search t)
(abort-char
(string-match "[^aeiou]" string (1- len))))
(if abort-char
(substring string 0 (1+ abort-char))
string)))))
(defun bibtex-autokey-get-namefield (min max)
;; returns the contents of the name field of the current entry
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; does some modifications based on `bibtex-autokey-name-change-strings'
;; and removes newlines unconditionally
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(goto-char min)
(let ((case-fold-search t))
(if (re-search-forward
(bibtex-cfield "\\(author\\)\\|\\(editor\\)" bibtex-field-text)
max t)
(bibtex-autokey-change
(buffer-substring-no-properties
(1+ (match-beginning (+ bibtex-text-in-cfield 2)))
(1- (match-end (+ bibtex-text-in-cfield 2))))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(append bibtex-autokey-name-change-strings '(("\n" " "))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"")))
(defun bibtex-autokey-get-names (namefield)
;; gathers all names in namefield into a list
(let ((case-fold-search t)
names)
(while (not (equal namefield ""))
(let (name)
(if (string-match "[ \t\n]and[ \t\n]" namefield)
(setq name (substring namefield 0 (match-beginning 0))
namefield (substring namefield (match-end 0)))
(setq name namefield
namefield ""))
(setq names (append names (list name)))))
names))
(defun bibtex-autokey-demangle-name (fullname)
;; gets the `last' part from a well-formed name
(let* (case-fold-search
(lastname
(if (string-match "," fullname)
;; name is of the form "von Last, First" or
;; "von Last, Jr, First"
;; --> take only the part before the comma
(let ((von-last
(substring fullname 0 (match-beginning 0))))
(if (string-match "^[a-z]" von-last)
;; von-last has a "von" part --> take the "last" part
(if (string-match "[ \t][A-Z]" von-last)
(substring von-last (1+ (match-beginning 0)))
(error
"Name %s is incorrectly formed" fullname))
;; von-last has no "von" part --> take all
von-last))
;; name is of the form "First von Last"
(if (string-match "[ \t]" fullname)
;; more than one token
(if (string-match "[ \t][a-z]" fullname)
;; there is a "von" part
;; --> take everything after that
(if (string-match
"[ \t][A-Z]" fullname (match-end 0))
(substring fullname (1+ (match-beginning 0)))
(error
"Name %s is incorrectly formed" fullname))
;; there is no "von" part --> take only the last token
(if (string-match " [^ ]*$" fullname)
(substring fullname (1+ (match-beginning 0)))
(error "Name %s is incorrectly formed" fullname)))
;; only one token --> take it
fullname)))
(usename
(if (string-match "[ \t]+" lastname)
;; lastname consists of two or more tokens
;; --> take only the first one
(substring lastname 0 (match-beginning 0))
lastname)))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(funcall bibtex-autokey-name-case-convert usename)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-autokey-get-namelist (namefield)
;; gets namefield, performs abbreviations on the last parts, and
;; return results as a list
(mapcar
(lambda (fullname)
(setq
fullname (substring fullname (string-match "[^ \t]" fullname)))
(bibtex-autokey-abbrev
(bibtex-autokey-demangle-name fullname)
bibtex-autokey-name-length))
(bibtex-autokey-get-names namefield)))
(defun bibtex-autokey-get-yearfield (min max)
;; get year field from current or maybe crossreferenced entry
(let ((case-fold-search t))
(goto-char min)
(if (re-search-forward
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(bibtex-cfield "year" bibtex-field-text) max t)
(let ((year (buffer-substring-no-properties
(match-beginning bibtex-text-in-cfield)
(match-end bibtex-text-in-cfield))))
(string-match "[^0-9]*\\([0-9]+\\)" year)
(substring year (match-beginning 1) (match-end 1)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if bibtex-autokey-year-use-crossref-entry
(let ((crossref-field
(progn
(goto-char min)
(if (re-search-forward
(bibtex-cfield
"\\(OPT\\)?crossref" bibtex-field-text)
max t)
(buffer-substring-no-properties
(1+
(match-beginning (+ bibtex-text-in-cfield 1)))
(1-
(match-end (+ bibtex-text-in-cfield 1))))))))
(if (not (bibtex-find-entry-location crossref-field t))
(let ((end-of-crefd-entry (bibtex-end-of-entry)))
(bibtex-beginning-of-entry)
(if (re-search-forward
(bibtex-cfield "year" "[0-9]+")
end-of-crefd-entry t)
(buffer-substring-no-properties
(match-beginning bibtex-text-in-cfield)
(match-end bibtex-text-in-cfield))
""))
""))
""))))
(defun bibtex-autokey-get-titlestring (min max)
;; get title field contents up to a terminator
(let ((case-fold-search t))
(let ((titlefield
(progn
(goto-char min)
(if (re-search-forward
(bibtex-cfield "title" bibtex-field-text) max t)
(bibtex-autokey-change
(buffer-substring-no-properties
(1+ (match-beginning bibtex-text-in-cfield))
(1- (match-end bibtex-text-in-cfield)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-autokey-titleword-change-strings)
"")))
(index 0)
(numberofitems
(length bibtex-autokey-title-terminators)))
(while (< index numberofitems)
(if (string-match
(elt bibtex-autokey-title-terminators index) titlefield)
(setq
titlefield (substring titlefield 0 (match-beginning 0))))
(setq index (1+ index)))
titlefield)))
(defun bibtex-autokey-get-titles (titlestring)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; gathers words from titlestring into a list. Ignores
;; specific words and uses only a specific amount of words.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let (case-fold-search
titlewords
titlewords-extra
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(counter 0))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(while (and
(not (equal titlestring ""))
(or
(not (numberp bibtex-autokey-titlewords))
(< counter
(+ bibtex-autokey-titlewords
bibtex-autokey-titlewords-stretch))))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (string-match "\\b\\w+" titlestring)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let* ((end-match (match-end 0))
(titleword
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(substring titlestring (match-beginning 0) end-match)))
(if (bibtex-member-of-regexp
titleword
bibtex-autokey-titleword-ignore)
(setq counter (1- counter))
(setq
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
titleword
(funcall bibtex-autokey-titleword-case-convert titleword))
(if (or (not (numberp bibtex-autokey-titlewords))
(< counter bibtex-autokey-titlewords))
(setq titlewords (append titlewords (list titleword)))
(setq titlewords-extra
(append titlewords-extra (list titleword)))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq
titlestring (substring titlestring end-match)))
(setq titlestring ""))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(setq counter (1+ counter)))
(if (string-match "\\b\\w+" titlestring)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
titlewords
(append titlewords titlewords-extra))))
(defun bibtex-autokey-get-titlelist (titlestring)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; returns all words in titlestring as a list
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; does some abbreviation on the found words
(mapcar
(lambda (titleword)
(let ((abbrev
(bibtex-assoc-of-regexp
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
titleword bibtex-autokey-titleword-abbrevs)))
(if abbrev
(elt abbrev 1)
(bibtex-autokey-abbrev
titleword
bibtex-autokey-titleword-length))))
(bibtex-autokey-get-titles titlestring)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-generate-autokey ()
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
"Generates automatically a key from the author/editor and the title field.
1997-12-09 22:43:32 +00:00
This will only work for entries where each field begins on a separate line.
The generation algorithm works as follows:
1. Use the value of `bibtex-autokey-prefix-string' as a prefix.
2. If there is a non-empty author (preferred) or editor field,
use it as the name part of the key.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
3. Change any substring found in
`bibtex-autokey-name-change-strings' to the corresponding new
one (see documentation of this variable for further detail).
4. For every of at least first `bibtex-autokey-names' names in
the name field, determine the last name. If there are maximal
1997-12-09 22:43:32 +00:00
`bibtex-autokey-names' + `bibtex-autokey-names-stretch'
names, all names are used.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
5. From every last name, take at least
`bibtex-autokey-name-length' characters (abort only after a
consonant or at a word end).
6. Convert all last names according to the conversion function
`bibtex-autokey-name-case-convert'.
7. Build the name part of the key by concatenating all
abbreviated last names with the string
`bibtex-autokey-name-separator' between any two. If there are
more names than are used in the name part, prepend the string
contained in `bibtex-autokey-additional-names'.
1997-12-09 22:43:32 +00:00
8. Build the year part of the key by truncating the contents of
the year field to the rightmost `bibtex-autokey-year-length'
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
digits (useful values are 2 and 4). If the year field is
1997-12-09 22:43:32 +00:00
absent, but the entry has a valid crossref field and the
variable `bibtex-autokey-year-use-crossref-entry' is non-nil,
use the year field of the crossreferenced entry instead.
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
9. For the title part of the key change the contents of the
title field of the reference according to
`bibtex-autokey-titleword-change-strings' to the
corresponding new one (see documentation of this variable for
1997-12-09 22:43:32 +00:00
further detail).
10. Abbreviate the result to the string up to (but not including)
the first occurrence of a regexp matched by the items of
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
`bibtex-autokey-title-terminators' and delete those words which
appear in `bibtex-autokey-titleword-ignore'.
Build the title part of the key by using at least the first
`bibtex-autokey-titlewords' words from this
abbreviated title. If the abbreviated title ends after
maximal `bibtex-autokey-titlewords' +
`bibtex-autokey-titlewords-stretch' words, all
words from the abbreviated title are used.
11. Convert all used titlewords according to the conversion function
`bibtex-autokey-titleword-case-convert'.
12. For every used title word that appears in
`bibtex-autokey-titleword-abbrevs' use the corresponding
abbreviation (see documentation of this variable for further
detail).
13. From every title word not generated by an abbreviation, take
at least `bibtex-autokey-titleword-length' characters (abort
only after a consonant or at a word end).
14. Build the title part of the key by concatenating all
abbreviated title words with the string
`bibtex-autokey-titleword-separator' between any two.
15. At least, to get the key, concatenate
`bibtex-autokey-prefix-string', the name part, the year part
and the title part with `bibtex-autokey-name-year-separator'
between the name part and the year part if both are non-empty
and `bibtex-autokey-year-title-separator' between the year
part and the title part if both are non-empty. If the year
part is empty, but not the other two parts,
`bibtex-autokey-year-title-separator' is used as well.
16. If the value of `bibtex-autokey-before-presentation-function'
is non-nil, it must be a function taking one argument. This
function is then called with the generated key as the
argument. The return value of this function (a string) is
used as the key.
1997-12-09 22:43:32 +00:00
17. If the value of `bibtex-autokey-edit-before-use' is non-nil,
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
the key is then presented in the minibuffer to the user,
where it can be edited. The key given by the user is then
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
used."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(let* ((pnt (point))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(min (bibtex-beginning-of-entry))
(max (bibtex-end-of-entry))
(namefield (bibtex-autokey-get-namefield min max))
(name-etal "")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(namelist
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((nl (bibtex-autokey-get-namelist namefield)))
(if (or (not (numberp bibtex-autokey-names))
(<= (length nl)
(+ bibtex-autokey-names
bibtex-autokey-names-stretch)))
nl
(setq name-etal bibtex-autokey-additional-names)
(let (nnl)
(while (< (length nnl) bibtex-autokey-names)
(setq nnl (append nnl (list (car nl)))
nl (cdr nl)))
nnl))))
(namepart
(concat
(mapconcat (lambda (name) name)
namelist
bibtex-autokey-name-separator)
name-etal))
(yearfield (bibtex-autokey-get-yearfield min max))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(yearpart
(if (equal yearfield "")
""
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(substring
yearfield
(- (length yearfield) bibtex-autokey-year-length))))
(titlestring (bibtex-autokey-get-titlestring min max))
(titlelist (bibtex-autokey-get-titlelist titlestring))
(titlepart
(mapconcat
(lambda (name) name)
titlelist
bibtex-autokey-titleword-separator))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(autokey
(concat
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-autokey-prefix-string
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
namepart
(if (not
(or
(equal namepart "")
(equal yearpart "")))
bibtex-autokey-name-year-separator)
yearpart
(if (not
(or
(and
(equal namepart "")
(equal yearpart ""))
(equal titlepart "")))
bibtex-autokey-year-title-separator)
titlepart)))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if bibtex-autokey-before-presentation-function
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq
autokey
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(funcall bibtex-autokey-before-presentation-function autokey)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(goto-char pnt)
autokey))
1992-07-16 21:47:34 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-parse-keys (add verbose &optional abortable)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
;; Sets bibtex-keys to the keys used in the whole (possibly
;; restricted) buffer (either as entry keys or as crossref entries).
;; If ADD is non-nil adds the new keys to bibtex-keys instead of
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; simply resetting it. If VERBOSE is non-nil gives messages about
;; progress. If ABORTABLE is non-nil abort on user input.
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if bibtex-maintain-sorted-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t)
(crossref-field
(bibtex-cfield
"crossref" (concat "[{\"]" bibtex-reference-key "[}\"]")))
(labels (if add
bibtex-keys)))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(save-excursion
(goto-char (point-min))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if verbose
(bibtex-progress-message
(concat (buffer-name) ": parsing reference keys")))
(if (catch 'userkey
(bibtex-skip-to-valid-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(while (not (eobp))
(if (and
abortable
(input-pending-p))
(throw 'userkey t))
(if verbose
(bibtex-progress-message))
(let (label
label2)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(cond
((looking-at bibtex-reference-head)
(setq
label
(buffer-substring-no-properties
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head)))
(let ((p (point))
(m (bibtex-end-of-entry)))
(goto-char p)
(if (re-search-forward crossref-field m t)
(setq
label2
(buffer-substring-no-properties
(1+ (match-beginning bibtex-text-in-cfield))
(1- (match-end bibtex-text-in-cfield)))))
(goto-char p)))
((looking-at bibtex-string)
(setq
label
(buffer-substring-no-properties
(match-beginning bibtex-key-in-string)
(match-end bibtex-key-in-string)))))
(forward-char)
(bibtex-skip-to-valid-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not (assoc label labels))
(setq labels
(cons (list label) labels)))
(if (and label2
(not (assoc label2 labels)))
(setq labels
(cons (list label2) labels))))))
;; user has aborted by typing a key --> return nil
nil
;; successful operation --> return t
(setq
bibtex-buffer-last-parsed-tick (buffer-modified-tick)
bibtex-keys labels)
(if verbose
(bibtex-progress-message 'done))
t)))))
(defun bibtex-parse-buffers-stealthily ()
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; Called by bibtex-run-with-idle-timer. Whenever emacs has been idle
;; for bibtex-parse-keys-timeout seconds, all BibTeX buffers (starting
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; with the current) are parsed.
(let ((buffers (buffer-list)))
(save-excursion
(while (and buffers (not (input-pending-p)))
(set-buffer (car buffers))
(save-restriction
(widen)
(if (and
(eq major-mode 'bibtex-mode)
bibtex-maintain-sorted-entries
(not
(eq (buffer-modified-tick)
bibtex-buffer-last-parsed-tick)))
(if (bibtex-parse-keys nil t t)
;; successful operation --> remove buffer from list
(setq buffers (cdr buffers)))
;; buffer is no BibTeX buffer or needs no parsing
(setq buffers (cdr buffers))))))))
(defun bibtex-complete (string-list &optional complete-strings)
;; Complete word fragment before point to longest prefix of one
;; string defined in STRING-LIST. If point is not after the part of
;; a word, all strings are listed. If COMPLETE-STRINGS is non-nil,
;; add the strings defined in this buffer before cursor to
;; STRING-LIST and remove surrounding delimiters if complete string
;; could be expanded.
(let* ((case-fold-search t)
(end (point))
(beg (save-excursion
(re-search-backward "[ \t{\"]")
(forward-char)
(point)))
(part-of-word (buffer-substring-no-properties beg end))
(completions (copy-sequence string-list))
(completion (save-excursion
(if complete-strings
(while (re-search-backward
bibtex-string nil t)
(setq completions
(cons
(list
(buffer-substring-no-properties
(match-beginning bibtex-key-in-string)
(match-end bibtex-key-in-string)))
completions))))
(setq completions
(sort completions
(lambda(x y)
(string-lessp
(car x)
(car y)))))
(try-completion part-of-word completions))))
(cond ((eq completion t)
(if complete-strings
;; remove double-quotes or braces if field is no concatenation
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(save-excursion
(bibtex-inside-field)
(bibtex-enclosing-field)
(let ((end (match-end bibtex-text-in-field)))
(goto-char (match-beginning bibtex-text-in-field))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (and
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(looking-at bibtex-field-string)
(equal (match-end 0) end))
(bibtex-remove-delimiters))))))
((not completion)
(error "Can't find completion for \"%s\"" part-of-word))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
((not (string= part-of-word completion))
(delete-region beg end)
(insert completion)
(if (and (assoc completion completions)
complete-strings)
;; remove double-quotes or braces if field is no concatenation
(save-excursion
(bibtex-inside-field)
(bibtex-enclosing-field)
(let ((end (match-end bibtex-text-in-field)))
(goto-char (match-beginning bibtex-text-in-field))
(if (and
(looking-at bibtex-field-string)
(equal (match-end 0) end))
(bibtex-remove-delimiters))))))
(t
(message "Making completion list...")
(let ((list (all-completions part-of-word completions)))
(with-output-to-temp-buffer "*Completions*"
(display-completion-list list)))
(message "Making completion list...done")))))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-do-auto-fill ()
(let ((fill-prefix
(make-string
(+ bibtex-entry-offset bibtex-contline-indentation) ? )))
(do-auto-fill)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-pop (arg direction)
;; generic function to be used by bibtex-pop-previous and bibtex-pop-next
(let (bibtex-help-message)
(bibtex-find-text nil))
(save-excursion
;; parse current field
(bibtex-inside-field)
(bibtex-enclosing-field)
(let ((case-fold-search t)
(start-old-text (match-beginning bibtex-text-in-field))
(stop-old-text (match-end bibtex-text-in-field))
(start-name (match-beginning bibtex-name-in-field))
(stop-name (match-end bibtex-name-in-field))
(new-text))
(goto-char start-name)
;; construct regexp for field with same name as this one,
;; ignoring possible OPT's or ALT's
(let ((matching-entry
(bibtex-cfield
(buffer-substring-no-properties
(if (looking-at "OPT\\|ALT")
(+ (point) (length "OPT"))
(point))
stop-name)
bibtex-field-text)))
;; if executed several times in a row, start each search where
;; the last one was finished
(cond ((eq last-command 'bibtex-pop)
t
)
(t
(bibtex-enclosing-reference-maybe-empty-head)
(setq
bibtex-pop-previous-search-point (match-beginning 0)
bibtex-pop-next-search-point (point))))
(if (eq direction 'previous)
(goto-char bibtex-pop-previous-search-point)
(goto-char bibtex-pop-next-search-point))
;; Now search for arg'th previous/next similar field
(cond
((if (eq direction 'previous)
(re-search-backward matching-entry nil t arg)
(re-search-forward matching-entry nil t arg))
;; Found a matching field. Remember boundaries.
(setq bibtex-pop-previous-search-point (match-beginning 0))
(setq bibtex-pop-next-search-point (match-end 0))
(setq new-text
(buffer-substring-no-properties
(match-beginning bibtex-text-in-field)
(match-end bibtex-text-in-field)))
;; change delimiters, if any changes needed
(let ((start 0)
old-open
new-open
old-close
new-close)
(if (equal bibtex-field-delimiters 'braces)
(setq old-open ?\"
new-open ?\{
old-close ?\"
new-close ?\})
(setq old-open ?\{
new-open ?\"
old-close ?\}
new-close ?\"))
(while (string-match bibtex-field-string new-text start)
(let ((beg (match-beginning 0))
(end (1- (match-end 0))))
(if (and
(eq (aref new-text beg) old-open)
(eq (aref new-text end) old-close))
(progn
(aset new-text beg new-open)
(aset new-text end new-close))))
(setq start (match-end 0))))
(bibtex-flash-head)
;; Go back to where we started, delete old text, and pop new.
(goto-char stop-old-text)
(delete-region start-old-text stop-old-text)
(insert new-text))
(t
;; search failed
(error (concat "No "
(if (eq direction 'previous)
"previous"
"next")
" matching BibTeX field.")))))))
(let (bibtex-help-message)
(bibtex-find-text nil))
(setq this-command 'bibtex-pop))
;; Interactive Functions:
;;;###autoload
(defun bibtex-mode ()
"Major mode for editing BibTeX files.
To submit a problem report, enter \\[bibtex-submit-bug-report] from a
1997-08-22 02:23:24 +00:00
BibTeX mode buffer. This automatically sets up a mail buffer with
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
version information already added. You just need to add a description
of the problem, including a reproducable test case and send the
message.
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
General information on working with BibTeX mode:
You should use commands as \\[bibtex-Book] to get a template for a
specific entry. You should then fill in all desired fields using
\\[bibtex-next-field] to jump from field to field. After having filled
in all desired fields in the entry, you should clean the new entry
with command \\[bibtex-clean-entry].
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Some features of BibTeX mode are available only by setting variable
bibtex-maintain-sorted-entries to t. However, then BibTeX mode will
work with buffer containing only valid (syntactical correct) entries
and with entries being sorted. This is usually the case, if you have
created a buffer completely with BibTeX mode and finished every new
entry with \\[bibtex-clean-entry].
For third party BibTeX buffers, please call the function
`bibtex-convert-alien' to fully take advantage of all features of
BibTeX mode.
Special information:
A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry.
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
The optional fields start with the string OPT, and are thus ignored by BibTeX.
Alternatives from which only one is required start with the string ALT.
The OPT or ALT string may be removed from a field with \\[bibtex-remove-OPT-or-ALT].
\\[bibtex-make-field] inserts a new field after the current one.
\\[bibtex-kill-field] kills the current field entirely.
\\[bibtex-yank] will yank the last recently killed field after the
current field.
\\[bibtex-remove-delimiters] removes the double-quotes or braces around the text of the current field.
\\[bibtex-empty-field] replaces the text of the current field with the default \"\" or {}.
The command \\[bibtex-clean-entry] cleans the current entry, i.e. it removes OPT/ALT
from all non-empty optional or alternative fields, checks that no required
fields are empty, and does some formatting dependent on the value of
bibtex-entry-format.
Note: some functions in BibTeX mode depend on entries being in a special
format (all fields beginning on separate lines), so it is usually a bad
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
idea to remove `realign' from bibtex-entry-format.
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
Use \\[bibtex-find-text] to position the cursor at the end of the current field.
Use \\[bibtex-next-field] to move to end of the next field.
The following may be of interest as well:
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
Functions:
bibtex-entry
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-kill-entry
bibtex-yank-pop
bibtex-pop-previous
bibtex-pop-next
bibtex-complete-string
bibtex-complete-key
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-print-help-message
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-generate-autokey
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-beginning-of-entry
bibtex-end-of-entry
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-reposition-window
bibtex-mark-entry
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-ispell-abstract
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-ispell-entry
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-narrow-to-entry
bibtex-hide-entry-bodies
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-sort-buffer
bibtex-validate
bibtex-count
bibtex-fill-entry
bibtex-reformat
bibtex-convert-alien
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
Variables:
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-field-delimiters
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-include-OPTcrossref
bibtex-include-OPTkey
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-user-optional-fields
bibtex-entry-format
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-sort-ignore-string-entries
bibtex-maintain-sorted-entries
bibtex-entry-field-alist
bibtex-predefined-strings
bibtex-string-files
---------------------------------------------------------
1997-08-22 02:23:24 +00:00
Entry to BibTeX mode calls the value of `bibtex-mode-hook' if that value is
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
non-nil.
\\{bibtex-mode-map}"
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(kill-all-local-variables)
(use-local-map bibtex-mode-map)
(setq major-mode 'bibtex-mode)
(setq mode-name "BibTeX")
(set-syntax-table bibtex-mode-syntax-table)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq bibtex-strings bibtex-predefined-strings)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(mapcar
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda (filename)
;; collect pathnames
(let* ((path (if bibtex-string-file-path
bibtex-string-file-path
"."))
(dirs
(mapcar
(lambda (dirname) ;; strips off trailing slashes
(let ((len (length dirname)))
(if (equal (elt dirname (1- len)) "/")
(substring dirname 0 (1- (1- len)))
dirname)))
(let (actdirs)
(while (string-match ":" path)
(setq actdirs
(append actdirs
(list (substring path 0 (1- (match-end 0)))))
path (substring path (match-end 0))))
(append actdirs (list path)))))
(filename (if (string-match "\.bib$" filename)
filename
(concat filename ".bib")))
fullfilename
(item 0)
(size (length dirs)))
;; test filenames
(while (and
(< item size)
(not (file-readable-p
(setq fullfilename
(concat (elt dirs item) "/" filename)))))
(setq item (1+ item)))
(if (< item size)
;; file was found
(let ((case-fold-search t)
(compl nil))
(with-temp-buffer
(insert-file-contents fullfilename)
(goto-char (point-min))
(while (re-search-forward bibtex-string nil t)
(setq compl
(cons (list (match-string-no-properties
bibtex-key-in-string))
compl))))
(setq bibtex-strings (append bibtex-strings (nreverse compl))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(error
"File %s not in paths defined by bibtex-string-file-path variable"
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
filename))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-string-files)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if bibtex-maintain-sorted-entries
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(bibtex-run-with-idle-timer
1 nil
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda ()
(bibtex-parse-keys nil t t))))
;; to get buffer parsed once if everything else (including things
;; installed in bibtex-mode-hook) has done its work
(if (not bibtex-parse-idle-timer)
(setq bibtex-parse-idle-timer
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(bibtex-run-with-idle-timer
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-parse-keys-timeout t
'bibtex-parse-buffers-stealthily)))
;; Install stealthy parse function if not already installed
(make-local-variable 'paragraph-start)
(setq paragraph-start "[ \f\n\t]*$")
(make-local-variable 'comment-start)
(setq comment-start bibtex-comment-start)
(make-local-variable 'comment-start-skip)
(setq comment-start-skip bibtex-comment-start)
(make-local-variable 'comment-column)
(setq comment-column 0)
(make-local-variable 'defun-prompt-regexp)
(setq defun-prompt-regexp "^@[a-zA-Z0-9]+")
(make-local-variable 'outline-regexp)
(setq outline-regexp "@")
(make-local-variable 'normal-auto-fill-function)
(setq normal-auto-fill-function 'bibtex-do-auto-fill)
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
'(bibtex-font-lock-keywords
nil t ((?$ . "\"")
;; Mathematical expressions should be fontified as strings
(?\" . ".")
;; Quotes are field delimiters and quote-delimited
;; entries should be fontified in the same way as
;; brace-delimited ones
)))
(make-local-variable 'font-lock-mark-block-function)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq font-lock-mark-block-function
(lambda ()
(set-mark (bibtex-end-of-entry))
(bibtex-beginning-of-entry)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq imenu-generic-expression
(list (list nil bibtex-reference-head bibtex-key-in-head)))
1997-12-12 17:10:08 +00:00
(setq imenu-case-fold-search t)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
;; XEmacs needs easy-menu-add, Emacs does not care
(easy-menu-add bibtex-edit-menu)
(easy-menu-add bibtex-entry-menu)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(run-hooks 'bibtex-mode-hook))
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(defun bibtex-submit-bug-report ()
"Submit via mail a bug report on bibtex.el."
(interactive)
(if (y-or-n-p "Do you want to submit a bug report on BibTeX mode? ")
(progn
(require 'reporter)
(let ((reporter-prompt-for-summary-p t))
(reporter-submit-bug-report
bibtex-maintainer-address
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(concat "bibtex.el " "(emacs 19.35)")
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(list
'system-configuration
'system-configuration-options
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-mode-hook
'bibtex-parse-keys-timeout
;; possible general errors
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-sort-ignore-string-entries
'bibtex-maintain-sorted-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-entry-delimiters
'bibtex-field-delimiters
'bibtex-comma-after-last-field
'bibtex-entry-offset
'bibtex-field-indentation
'bibtex-text-indentation
'bibtex-contline-indentation
'bibtex-align-at-equal-sign
;; possible sorting and parsing bugs
'bibtex-entry-format
'bibtex-add-entry-hook
'bibtex-clean-entry-hook
;; possible cleaning error
'bibtex-user-optional-fields
;; possible format error
'bibtex-predefined-month-strings
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-predefined-strings
'bibtex-string-files
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-string-file-path
;; possible format error
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-font-lock-keywords
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; possible bugs regarding fontlocking
'bibtex-autokey-prefix-string
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-autokey-names
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-autokey-names-stretch
'bibtex-autokey-additional-names
'bibtex-autokey-transcriptions
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-autokey-name-change-strings
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
'bibtex-autokey-name-case-convert
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-autokey-name-length
'bibtex-autokey-name-separator
'bibtex-autokey-year-length
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-autokey-year-use-crossref-entry
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-autokey-titlewords
'bibtex-autokey-title-terminators
'bibtex-autokey-titlewords-stretch
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
'bibtex-autokey-titleword-ignore
'bibtex-autokey-titleword-case-convert
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-autokey-titleword-abbrevs
'bibtex-autokey-titleword-change-strings
'bibtex-autokey-titleword-length
'bibtex-autokey-titleword-separator
'bibtex-autokey-name-year-separator
'bibtex-autokey-year-title-separator
'bibtex-autokey-edit-before-use
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
'bibtex-autokey-before-presentation-function
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; possible bugs regarding automatic labels
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-entry-field-alist
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; possible format error
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
'bibtex-help-message
'bibtex-include-OPTcrossref
'bibtex-include-OPTkey
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'bibtex-field-kill-ring-max
'bibtex-entry-kill-ring-max
;; user variables which shouldn't cause any errors
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
)
nil nil
(concat "To the bibtex.el maintainer:
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
I want to report a bug on Emacs BibTeX mode.
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
case I'm reporting on a version of `bibtex.el' which is not part of
the standard emacs distribution) I loaded the questionable version
of `bibtex.el' with `M-x load-file', and then, to produce the buggy
behaviour, I did the following:")))
(message nil))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-entry (entry-type)
"Insert a new BibTeX entry.
1997-08-22 02:23:24 +00:00
After insertion it calls the functions in `bibtex-add-entry-hook'."
(interactive (let* ((completion-ignore-case t)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(e-t (completing-read
"Entry Type: "
bibtex-entry-field-alist
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
nil t nil 'bibtex-entry-type-history)))
(list e-t)))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not bibtex-keys)
(bibtex-parse-keys nil t))
(let* (required
optional
(key
(if bibtex-maintain-sorted-entries
(completing-read
(format "%s key: " entry-type)
bibtex-keys nil nil nil 'bibtex-key-history)))
(e (assoc-ignore-case entry-type bibtex-entry-field-alist))
(r-n-o (elt e 1))
(c-ref (elt e 2)))
(if (not e)
(error "Bibtex entry type %s not defined" entry-type))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (and
(member entry-type bibtex-include-OPTcrossref)
c-ref)
(setq required (elt c-ref 0)
optional (elt c-ref 1))
(setq required (elt r-n-o 0)
optional (elt r-n-o 1)))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if bibtex-maintain-sorted-entries
(bibtex-find-entry-location key)
(bibtex-move-outside-of-entry))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(indent-to-column bibtex-entry-offset)
(insert "@" entry-type (bibtex-entry-left-delimiter))
1992-07-16 21:47:34 +00:00
(if key
(insert key))
(save-excursion
(mapcar 'bibtex-make-field required)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(if (member entry-type bibtex-include-OPTcrossref)
(bibtex-make-optional-field '("crossref")))
(if bibtex-include-OPTkey
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (or
(stringp bibtex-include-OPTkey)
(fboundp bibtex-include-OPTkey))
(bibtex-make-optional-field
(list "key" nil bibtex-include-OPTkey))
(bibtex-make-optional-field '("key"))))
(mapcar 'bibtex-make-optional-field optional)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(mapcar 'bibtex-make-optional-field bibtex-user-optional-fields)
(if bibtex-comma-after-last-field
(insert ","))
(insert "\n")
(indent-to-column bibtex-entry-offset)
(insert (bibtex-entry-right-delimiter) "\n\n"))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(bibtex-next-field t)
(run-hooks 'bibtex-add-entry-hook)))
1992-07-16 21:47:34 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-print-help-message ()
"Prints helpful information about current field in current BibTeX entry."
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let* ((case-fold-search t)
(pnt (point))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(field-name
(progn
(condition-case errname
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-enclosing-field)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(search-failed
(goto-char pnt)
(error "Not on BibTeX field")))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(let ((mb (match-beginning bibtex-name-in-field))
(me (match-end bibtex-name-in-field)))
(goto-char mb)
(buffer-substring-no-properties
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (looking-at "OPT\\|ALT")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(+ 3 mb)
mb)
me))))
(reference-type
(progn
(re-search-backward
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
bibtex-reference-maybe-empty-head nil t)
(buffer-substring-no-properties
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(1+ (match-beginning bibtex-type-in-head))
(match-end bibtex-type-in-head))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(entry-list
(assoc-ignore-case reference-type
bibtex-entry-field-alist))
(c-r-list (elt entry-list 2))
(req-opt-list
(if (and
(member reference-type bibtex-include-OPTcrossref)
c-r-list)
c-r-list
(elt entry-list 1)))
(list-of-entries (append
(elt req-opt-list 0)
(elt req-opt-list 1)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-user-optional-fields
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(if (member
reference-type
bibtex-include-OPTcrossref)
'(("crossref"
"Label of the crossreferenced entry")))
(if bibtex-include-OPTkey
'(("key"
"Key used for label creation if author and editor fields are missing"))))))
(goto-char pnt)
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(let ((comment (assoc-ignore-case field-name list-of-entries)))
(if comment
(message (elt comment 1))
(message "NO COMMENT AVAILABLE")))))
1992-02-22 21:47:46 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-make-field (e-t &optional called-by-yank)
"Makes a field named E-T in current BibTeX entry.
This function is for interactive and non-interactive purposes. To call
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
it interactively, just give it no arguments and enter the field name
using the minibuffer."
(interactive "*P")
(if (not e-t)
(setq
e-t
(let* ((reference-type
(save-excursion
(bibtex-enclosing-reference-maybe-empty-head)
(buffer-substring-no-properties
(1+ (match-beginning bibtex-type-in-head))
(match-end bibtex-type-in-head))))
(fl
(car (cdr (assoc-ignore-case
reference-type bibtex-entry-field-alist))))
(field-list
(append
(elt fl 0) (elt fl 1) bibtex-user-optional-fields
(if bibtex-include-OPTcrossref '(("crossref" nil)))
(if bibtex-include-OPTkey '(("key" nil)))))
(completion-ignore-case t))
(completing-read
"BibTeX field name: " field-list
nil nil nil bibtex-field-history))))
(if (not (consp e-t))
(setq e-t (list e-t)))
(if (equal (length e-t) 1)
(setq e-t (append e-t (list ""))))
(if (equal (length e-t) 2)
(setq e-t (append e-t (list ""))))
(let ((name (if (elt e-t 3)
(concat "ALT" (car e-t))
(car e-t))))
(if (or (interactive-p) called-by-yank)
(let (bibtex-help-message)
(bibtex-find-text nil t)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (looking-at "[}\"]")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(forward-char))))
(insert ",\n")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(indent-to-column
(+ bibtex-entry-offset bibtex-field-indentation))
(insert name " ")
(if bibtex-align-at-equal-sign
(indent-to-column
(+ bibtex-entry-offset (- bibtex-text-indentation 2))))
(insert "= ")
(if (not bibtex-align-at-equal-sign)
(indent-to-column
(+ bibtex-entry-offset bibtex-text-indentation)))
(insert (if called-by-yank
""
(bibtex-field-left-delimiter))
(let ((init (elt e-t 2)))
(cond
((stringp init)
init)
((fboundp init)
(funcall init))
(t
(error "%s is neither a string nor a function" init))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if called-by-yank
""
(bibtex-field-right-delimiter)))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (interactive-p)
(forward-char -1))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-beginning-of-entry ()
"Move to beginning of BibTeX entry.
If inside an entry, move to the beginning of it, otherwise move to the
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
beginning of the previous entry.
1997-08-22 02:23:24 +00:00
If called from a program, this function returns the new location of point."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(skip-chars-forward " \t")
(if (looking-at "@")
(forward-char))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(re-search-backward "^[ \t]*@" nil 'move))
1992-07-16 21:47:34 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-end-of-entry ()
"Move to end of BibTeX entry.
If inside an entry, move to the end of it, otherwise move to the end
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
of the previous entry.
1997-08-22 02:23:24 +00:00
If called from a program, this function returns the new location of point."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t)
(valid-entry-head
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(concat "[ \t]*@[ \t]*\\("
(mapconcat
(lambda (type)
(concat "\\(" (car type) "\\)"))
bibtex-entry-field-alist
"\\|")
"\\)"))
(org (point))
(pnt (bibtex-beginning-of-entry))
err)
(cond
((looking-at "[ \t]*@[ \t]*string[ \t\n]*[({]")
(if (not (and
(re-search-forward bibtex-string nil t)
(equal (match-beginning 0) pnt)))
(setq err t)))
((looking-at "[ \t]*@[ \t]*preamble[ \t\n]*")
(goto-char (match-end 0))
(cond
((looking-at "(")
(if (not (re-search-forward ")[ \t]*\n\n" nil 'move))
(setq err t)))
((looking-at "{")
(if (not (re-search-forward "}[ \t]*\n\n" nil 'move))
(setq err t)))
(t
(setq err t)))
(if (not err)
(progn
(goto-char (match-beginning 0))
(forward-char))))
((looking-at valid-entry-head)
(bibtex-search-reference t nil t)
(if (not (equal (match-beginning 0) pnt))
(setq err t)))
(t
(if (interactive-p)
(message "Not on a known BibTeX entry."))
(goto-char org)))
(if err
(progn
(goto-char pnt)
(error "Syntactical incorrect entry starts here"))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(point))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-reposition-window (arg)
"Make the current BibTeX entry visible."
(interactive "P")
(save-excursion
(goto-char
(/ (+ (bibtex-beginning-of-entry) (bibtex-end-of-entry)) 2))
(recenter arg)))
(defun bibtex-mark-entry ()
"Put mark at beginning, point at end of current BibTeX entry."
(interactive)
(set-mark (bibtex-beginning-of-entry))
(bibtex-end-of-entry))
(defun bibtex-count-entries (&optional count-string-entries)
"Count number of entries in current buffer or region.
With prefix argument COUNT-STRING-ENTRIES it counts all entries,
otherwise it counts all except Strings.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
If mark is active it counts entries in region, if not in whole buffer."
(interactive "P")
(let ((pnt (point))
(start-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-beginning)
(bibtex-beginning-of-first-entry)))
(end-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-end)
(point-max)))
(number 0)
(bibtex-sort-ignore-string-entries
(not count-string-entries)))
(save-restriction
(narrow-to-region start-point end-point)
(goto-char start-point)
(bibtex-map-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda (current)
(setq number (1+ number)))))
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(message (concat (if (bibtex-mark-active) "Region" "Buffer")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
" contains %d entries.") number)
(goto-char pnt)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-ispell-entry ()
"Spell whole BibTeX entry."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(ispell-region (bibtex-beginning-of-entry) (bibtex-end-of-entry)))
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-ispell-abstract ()
"Spell abstract of BibTeX entry."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t)
(pnt (bibtex-end-of-entry)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-beginning-of-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not
(re-search-forward
(bibtex-cfield "abstract" bibtex-field-text) pnt t))
(error "No abstract in entry")))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(ispell-region (match-beginning bibtex-text-in-cfield)
(match-end bibtex-text-in-cfield)))
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-narrow-to-entry ()
"Narrow buffer to current BibTeX entry."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(save-excursion
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(narrow-to-region
(bibtex-beginning-of-entry) (bibtex-end-of-entry))))
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(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."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive "P")
(save-excursion
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((buffer-read-only nil))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(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)))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq selective-display (not arg)))))
(defun bibtex-sort-buffer ()
"Sort BibTeX buffer alphabetically by key.
1997-08-22 02:23:24 +00:00
Text outside of BibTeX entries is not affected. If
`bibtex-sort-ignore-string-entries' is non-nil, @String entries will be
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
ignored."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(save-restriction
(narrow-to-region
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-beginning-of-first-entry)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(save-excursion
(goto-char (point-max))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-end-of-entry)))
(bibtex-skip-to-valid-entry)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(sort-subr
nil
;; NEXTREC function
'bibtex-skip-to-valid-entry
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
;; ENDREC function
'bibtex-end-of-entry
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
;; STARTKEY function
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda ()
(let ((case-fold-search t))
(re-search-forward bibtex-reference-head)
(buffer-substring-no-properties
(match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head)))))))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(defun bibtex-find-entry-location (entry-name &optional ignore-dups)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"Looking for place to put the BibTeX entry named ENTRY-NAME.
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
Performs a binary search (therefore, buffer is assumed to be in sorted
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
order, without duplicates (see \\[bibtex-validate]), if it is
not, `bibtex-find-entry-location' will fail). If entry-name is already
used as a reference key, an error is signaled. However, if optional
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
variable IGNORE-DUPS is non-nil, no error messages about duplicate
entries are signaled, but the error handling is assumed to be made in
1997-08-22 02:23:24 +00:00
the calling function.
The value is nil if an duplicate entry error occurred,
and t in all other cases."
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let* ((case-fold-search t)
(left
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-beginning-of-first-entry)
(bibtex-skip-to-valid-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-end-of-entry)))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(right
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-beginning-of-last-entry)
(bibtex-skip-to-valid-entry t)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(point)))
actual-point
actual-key
(done (>= left right))
new
dup)
(while (not done)
(setq actual-point (/ (+ left right) 2))
(goto-char actual-point)
(bibtex-skip-to-valid-entry t)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(setq actual-key
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(progn
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(re-search-forward bibtex-reference-head)
(buffer-substring-no-properties
(match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head))))
(cond
((string-lessp entry-name actual-key)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq new (bibtex-beginning-of-entry))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (equal right new)
(setq done t)
(setq right new)))
((string-lessp actual-key entry-name)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq new (bibtex-end-of-entry))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (equal left new)
(setq done t)
(setq left new)))
((string-equal actual-key entry-name)
(setq dup t
done t)
(if (not ignore-dups)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(progn
(bibtex-beginning-of-entry)
(error "Entry with key `%s' already exists" entry-name))))))
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if dup
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(progn
(bibtex-beginning-of-entry)
nil)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(goto-char right)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq actual-key
(if (looking-at bibtex-reference-head)
(buffer-substring-no-properties
(match-beginning bibtex-key-in-reference)
(match-end bibtex-key-in-reference))))
(if (or
(not actual-key)
(string-lessp actual-key entry-name))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
;; buffer contains no valid entries or
;; greater than last entry --> append
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-end-of-entry)
(if (not (bobp))
(newline (forward-line 2)))
(beginning-of-line))
(goto-char right))
t)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-validate (&optional test-thoroughly)
"Validate if buffer or region is syntactically correct.
Only known reference types are checked, so you can put comments
outside of entries.
With optional argument TEST-THOROUGHLY non-nil it checks for absence of
required fields and questionable month fields as well.
If mark is active, it validates current region, if not whole buffer.
Returns t if test was successful, nil otherwise."
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(interactive "P")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let (error-list
syntax-error
(case-fold-search t)
(valid-bibtex-entry
(concat
"@[ \t]*\\(\\(string\\)\\|"
(mapconcat
(lambda (type)
(concat "\\(" (car type) "\\)"))
bibtex-entry-field-alist
"\\|")
"\\)"))
(pnt (point))
(start-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-beginning)
(bibtex-beginning-of-first-entry)))
(end-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-end)
(point-max))))
(save-restriction
(narrow-to-region start-point end-point)
;; looking if entries fit syntactical structure
(goto-char start-point)
(bibtex-progress-message "Checking syntactical structure")
(while (re-search-forward "^[ \t]*@" nil t)
(bibtex-progress-message)
(forward-char -1)
(let ((p (point))
(must-match
(looking-at valid-bibtex-entry)))
(if (not must-match)
(forward-char)
(let (bibtex-sort-ignore-string-entries)
(bibtex-skip-to-valid-entry))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (equal (point) p)
(forward-char)
(goto-char p)
(setq
error-list
(cons (list
(bibtex-current-line)
"Syntax error (check esp. commas, braces, and quotes)")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
error-list))
(forward-char)))))
(bibtex-progress-message 'done)
(if error-list
(setq syntax-error t)
;; looking for correct sort order and duplicates (only if
;; there were no syntax errors)
(if bibtex-maintain-sorted-entries
(let (previous)
(goto-char start-point)
(bibtex-progress-message "Checking correct sort order")
(bibtex-map-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda (current)
(bibtex-progress-message)
(cond ((or (not previous)
(string< previous current))
(setq previous current))
((string-equal previous current)
(setq
error-list
(cons (list (bibtex-current-line)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Duplicate key with previous")
error-list)))
(t
(setq previous current
error-list
(cons (list (bibtex-current-line)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Entries out of order")
error-list))))))
(bibtex-progress-message 'done)))
(if test-thoroughly
(progn
(goto-char start-point)
(bibtex-progress-message
"Checking required fields and month fields")
(let ((bibtex-sort-ignore-string-entries t)
(questionable-month
(concat
"[{\"]\\("
(mapconcat
(lambda (mon)
(concat "\\(" (car mon) "\\)"))
bibtex-predefined-month-strings
"\\|")
"\\)[}\"]")))
(bibtex-map-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda (current)
(bibtex-progress-message)
(let* ((beg (bibtex-beginning-of-entry))
(end (bibtex-end-of-entry))
(entry-list
(progn
(goto-char beg)
(bibtex-search-reference nil end)
(assoc-ignore-case
(buffer-substring-no-properties
(1+ (match-beginning bibtex-type-in-head))
(match-end bibtex-type-in-head))
bibtex-entry-field-alist)))
(req (copy-sequence (elt (elt entry-list 1) 0)))
(creq (copy-sequence (elt (elt entry-list 2) 0)))
crossref-there)
(goto-char beg)
(while (re-search-forward bibtex-field end t)
(let ((field-name
(buffer-substring-no-properties
(match-beginning bibtex-name-in-field)
(match-end bibtex-name-in-field))))
(if (and (equal (downcase field-name) "month")
(string-match
questionable-month
(buffer-substring-no-properties
(match-beginning bibtex-text-in-field)
(match-end bibtex-text-in-field))))
(setq
error-list
(cons
(list
(bibtex-current-line)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Questionable month field (delimited string)")
error-list)))
(setq
req
(delete (assoc-ignore-case field-name req) req)
creq
(delete (assoc-ignore-case field-name creq) creq))
(if (equal (downcase field-name) "crossref")
(setq crossref-there t))))
(if crossref-there
(setq req creq))
(if (or (> (length req) 1)
(and (= (length req) 1)
(not (elt (car req) 3))))
;; two (or more) fields missed or one field
;; missed and this isn't flagged alternative
;; (notice that this fails if there are more
;; than two alternatives in a BibTeX entry,
;; which isn't the case momentarily)
(setq
error-list
(cons
(list (save-excursion
(bibtex-beginning-of-entry)
(bibtex-current-line))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(concat
"Required field \""
(car (car req))
"\" missing"))
error-list)))))))
(bibtex-progress-message 'done)))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(goto-char pnt)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if error-list
(let ((bufnam (buffer-name))
(dir default-directory))
(setq error-list
(sort error-list
(lambda (a b)
(< (car a) (car b)))))
(let ((pop-up-windows t))
(pop-to-buffer nil t))
(switch-to-buffer
(get-buffer-create "*BibTeX validation errors*") t)
;; don't use switch-to-buffer-other-window, since this
;; doesn't allow the second parameter NORECORD
(setq default-directory dir)
(toggle-read-only -1)
(compilation-mode)
(delete-region (point-min) (point-max))
(goto-char (point-min))
(insert
"BibTeX mode command `bibtex-validate'\n"
(if syntax-error
"Maybe undetected errors due to syntax errors. Correct and validate again."
"")
"\n")
(while error-list
(insert
bufnam ":" (number-to-string (elt (car error-list) 0))
": " (elt (car error-list) 1) "\n")
(setq error-list (cdr error-list)))
(compilation-parse-errors nil nil)
(setq compilation-old-error-list compilation-error-list)
;; this is necessary to avoid reparsing of buffer if you
;; switch to compilation buffer and enter
;; `compile-goto-error'
(set-buffer-modified-p nil)
(toggle-read-only 1)
(goto-char (point-min))
(other-window -1)
;; return nil
nil)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(message "Region is syntactically correct")
(message "Buffer is syntactically correct"))
t)))
1991-05-09 21:50:45 +00:00
(defun bibtex-next-field (arg)
"Finds end of text of next BibTeX field; with ARG, to its beginning."
1991-05-09 21:50:45 +00:00
(interactive "P")
(bibtex-inside-field)
(let ((start (point)))
(condition-case ()
(progn
(bibtex-enclosing-field)
(goto-char (match-end 0))
(forward-char 2))
(error
(goto-char start)
(end-of-line)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(forward-char))))
(bibtex-find-text arg t))
1991-05-09 21:50:45 +00:00
(defun bibtex-find-text (arg &optional as-if-interactive silent)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
"Go to end of text of current field; with ARG, go to beginning."
1991-05-09 21:50:45 +00:00
(interactive "P")
(bibtex-inside-field)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (bibtex-enclosing-field (or (interactive-p) as-if-interactive))
1991-05-09 21:50:45 +00:00
(progn
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if arg
(progn
(goto-char (match-beginning bibtex-text-in-field))
(if (looking-at "[{\"]")
(forward-char)))
(goto-char (match-end bibtex-text-in-field))
(if (or
(= (preceding-char) ?})
(= (preceding-char) ?\"))
(forward-char -1)))
(if bibtex-help-message
(bibtex-print-help-message)))
(beginning-of-line)
(cond
((looking-at bibtex-string)
(goto-char
(if arg
(match-beginning bibtex-text-in-string)
(match-end bibtex-text-in-string))))
((looking-at bibtex-reference-maybe-empty-head)
(goto-char
(if arg
(match-beginning bibtex-key-in-head)
(match-end 0))))
(t
(if (not silent)
(error "Not on BibTeX field"))))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-remove-OPT-or-ALT ()
"Removes the string starting optional/alternative fields.
Aligns text and goes thereafter to end of text."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t))
(bibtex-inside-field)
(bibtex-enclosing-field)
(save-excursion
(goto-char (match-beginning bibtex-name-in-field))
(if (looking-at "OPT\\|ALT")
(progn
(delete-char (length "OPT"))
;; make field non-OPT
(search-forward "=")
(forward-char -1)
(delete-horizontal-space)
(if bibtex-align-at-equal-sign
(indent-to-column (- bibtex-text-indentation 2))
(insert " "))
(search-forward "=")
(delete-horizontal-space)
(if bibtex-align-at-equal-sign
(insert " ")
(indent-to-column bibtex-text-indentation)))))
(bibtex-inside-field)))
(defun bibtex-remove-delimiters ()
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"Removes \"\" or {} around string."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((case-fold-search t))
(save-excursion
(bibtex-inside-field)
(bibtex-enclosing-field)
(let ((start (match-beginning bibtex-text-in-field))
(stop (match-end bibtex-text-in-field)))
(goto-char start)
(while (re-search-forward bibtex-field-string stop t)
(let ((beg (copy-marker (match-beginning 0)))
(end (copy-marker (match-end 0))))
(goto-char beg)
(if (looking-at "[{\"]")
(delete-char 1))
(goto-char end)
(forward-char -1)
(if (looking-at "[}\"]")
(delete-char 1))))))))
(defun bibtex-kill-field (&optional copy-only)
"Kills the entire enclosing BibTeX field.
With prefix arg COPY-ONLY, copy the current field to `bibtex-field-kill-ring,'
1997-08-22 02:23:24 +00:00
but do not actually kill it."
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(interactive "P")
(let ((pnt (point))
(case-fold-search t))
1991-05-09 21:50:45 +00:00
(bibtex-inside-field)
(bibtex-enclosing-field)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let ((the-end (match-end 0))
(the-beginning (match-beginning 0)))
(goto-char the-end)
(skip-chars-forward " \t\n,")
(setq
bibtex-field-kill-ring
(cons
(list
'field
(buffer-substring-no-properties
(match-beginning bibtex-name-in-field)
(match-end bibtex-name-in-field))
(buffer-substring-no-properties
(match-beginning bibtex-text-in-field)
(match-end bibtex-text-in-field)))
bibtex-field-kill-ring))
(if (> (length bibtex-field-kill-ring) bibtex-field-kill-ring-max)
(setcdr
(nthcdr (1- bibtex-field-kill-ring-max) bibtex-field-kill-ring)
nil))
(setq bibtex-field-kill-ring-yank-pointer bibtex-field-kill-ring)
(if copy-only
(goto-char pnt)
(delete-region the-beginning the-end)
(let (bibtex-help-message)
(bibtex-find-text nil t t)))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(setq bibtex-last-kill-command 'field))
(defun bibtex-copy-field-as-kill ()
(interactive)
(bibtex-kill-field t))
1991-05-09 21:50:45 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-kill-entry (&optional copy-only)
1997-08-22 02:23:24 +00:00
"Kill the entire enclosing BibTeX reference entry.
With prefix arg COPY-ONLY the current reference entry to
1997-08-22 02:23:24 +00:00
`bibtex-entry-kill-ring', but do not actually kill it."
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(interactive "P")
(let ((pnt (point))
(case-fold-search t)
(beg (bibtex-beginning-of-entry))
(end
(progn
(bibtex-end-of-entry)
(if (re-search-forward
bibtex-reference-maybe-empty-head nil 'move)
(goto-char (match-beginning 0)))
(point))))
(setq
bibtex-entry-kill-ring
(cons
(list 'entry (buffer-substring-no-properties beg end))
bibtex-entry-kill-ring))
(if (> (length bibtex-entry-kill-ring) bibtex-entry-kill-ring-max)
(setcdr
(nthcdr (1- bibtex-entry-kill-ring-max) bibtex-entry-kill-ring)
nil))
(setq bibtex-entry-kill-ring-yank-pointer bibtex-entry-kill-ring)
(if copy-only
(goto-char pnt)
(delete-region beg end)))
(setq bibtex-last-kill-command 'entry))
(defun bibtex-copy-entry-as-kill ()
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-kill-entry t))
(defun bibtex-yank (&optional n)
"Reinsert the last BibTeX item.
More precisely, reinsert the field or entry killed or yanked most recently.
With argument N, reinsert the Nth most recently killed BibTeX item.
See also the command \\[bibtex-yank-pop]]."
(interactive "*p")
(bibtex-insert-current-kill (1- n))
(setq this-command 'bibtex-yank))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-yank-pop (n)
"Replace just-yanked killed BibTeX item with a different.
This command is allowed only immediately after a `bibtex-yank' or a
`bibtex-yank-pop'.
At such a time, the region contains a reinserted previously killed
BibTeX item. `bibtex-yank-pop' deletes that item and inserts in its
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
place a different killed BibTeX item.
With no argument, the previous kill is inserted.
With argument N, insert the Nth previous kill.
If N is negative, this is a more recent kill.
The sequence of kills wraps around, so that after the oldest one
comes the newest one."
(interactive "*p")
(if (not (eq last-command 'bibtex-yank))
(error "Previous command was not a BibTeX yank"))
(setq this-command 'bibtex-yank)
(let ((inhibit-read-only t))
(delete-region (point) (mark t))
(bibtex-insert-current-kill n)))
1991-05-09 21:50:45 +00:00
(defun bibtex-empty-field ()
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"Delete the text part of the current field, replace with empty text."
1991-05-09 21:50:45 +00:00
(interactive)
(bibtex-inside-field)
(bibtex-enclosing-field)
(goto-char (match-beginning bibtex-text-in-field))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(delete-region (point) (match-end bibtex-text-in-field))
(insert (concat (bibtex-field-left-delimiter)
(bibtex-field-right-delimiter)) )
1991-05-09 21:50:45 +00:00
(bibtex-find-text t))
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(defun bibtex-pop-previous (arg)
1997-08-22 02:23:24 +00:00
"Replace text of current field with the similar field in previous entry.
With arg, goes up ARG entries. Repeated, goes up so many times. May be
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
intermixed with \\[bibtex-pop-next] (bibtex-pop-next)."
(interactive "p")
(bibtex-pop arg 'previous))
1991-05-09 21:50:45 +00:00
(defun bibtex-pop-next (arg)
"Replace text of current field with the text of similar field in next entry.
With arg, goes down ARG entries. Repeated, goes down so many times. May be
1991-05-09 21:50:45 +00:00
intermixed with \\[bibtex-pop-previous] (bibtex-pop-previous)."
(interactive "p")
(bibtex-pop): New generic function which unifies the functionality of bibtex-pop-previous and bibtex-pop-next. Now, bibtex-pop moves to the end of field after the pop. Concatenated strings are now handled correctly. Delimiters are not added to non-delimited entries. Changed occurences of bibtex-text-in-cfield to bibtex-text-in-field. (bibtex-pop-previous, bibtex-pop-next): Call bibtex-pop. (bibtex-complete-string): Fixed bug that removed delimiters around the following field if current field is already undelimited on completion. (bibtex-complete-string, bibtex-remove-double-quotes-or-braces): Only remove delimiters if field text is not concatenated. (bibtex-font-lock-keywords): Use the same regexps used in all other places of bibtex.el to parse the buffer. (bibtex-mode): Changed the definition of font-lock-defaults, so that quote-delimited entries aren't fontified as strings anymore. (bibtex-parse-keys): Changed the regexp used for finding crossref entries. (bibtex-field-const, bibtex-reference-key): Fixed the regexp to match more of the characters allowed here by BibTeX/LaTeX. (bibtex-field-name): Made it less restrictive. (bibtex-field-string): Changed so that quote-delimited entries with quotes inside aren't a problem anymore. Changed nesting level of braces in entries to support three inner braces. (bibtex-validate-buffer): By giving an optional argument, the user can now let it not validate the whole buffer, but only the portion starting at point. Small modification in strategy used to find next entry. (bibtex-print-help-message): Ignore case in field name when searching for help text. (bibtex-submit-bug-report): New function.
1996-03-08 17:42:30 +00:00
(bibtex-pop arg 'next))
1991-05-09 21:50:45 +00:00
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-clean-entry (&optional new-label called-by-reformat)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
"Finish editing the current BibTeX entry and clean it up.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Checks that no required fields are empty and formats entry dependent
on the value of bibtex-entry-format.
If label of entry is empty or a prefix argument is given, calculate a
new entry label (note: this only will work if fields in entry begin on
separate lines prior to calling bibtex-clean-entry or if 'realign is
contained in bibtex-entry-format).
Don't call this on `string' or `preamble' entries.
At end of the cleaning process, the functions in
bibtex-clean-entry-hook are called with region narrowed to entry."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive "P")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-format-entry)
(let* ((case-fold-search t)
(eob (bibtex-end-of-entry))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(key (progn
(bibtex-beginning-of-entry)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(if (re-search-forward
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
bibtex-reference-head eob t)
(buffer-substring-no-properties
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head))))))
(if (or
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
new-label
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(not key))
(progn
(let ((autokey
(if bibtex-autokey-edit-before-use
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(read-from-minibuffer
"Key to use: " (bibtex-generate-autokey) nil nil
'bibtex-key-history)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(bibtex-generate-autokey))))
(bibtex-beginning-of-entry)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(re-search-forward bibtex-reference-maybe-empty-head)
(if (match-beginning bibtex-key-in-head)
(delete-region (match-beginning bibtex-key-in-head)
(match-end bibtex-key-in-head)))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(insert autokey)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(let* ((start (bibtex-beginning-of-entry))
(end (progn
(bibtex-end-of-entry)
(if (re-search-forward
bibtex-reference-maybe-empty-head nil 'move)
(goto-char (match-beginning 0)))
(point)))
(entry (buffer-substring start end)))
(delete-region start end)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(let ((success
(or
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
called-by-reformat
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(not bibtex-maintain-sorted-entries)
(bibtex-find-entry-location autokey t))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(insert entry)
(bibtex-auto-fill-function): Adapted for use with changed autofill policy of emacs-19.30 (uses now fill-prefix instead of indent-line-function). (bibtex-indent-line-function): Removed (not used any more). (bibtex-make-field): Was broken when called non-interactively. (bibtex-make-field): Point is now placed on closing brace or quote (suggested by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-clean-entry): Comma after last field isn't deleted anymore (new standard in BibTeX 0.99 and 1.xx). (bibtex-enclosing-reference-maybe-empty-head): Works with entries with comma after last field. (bibtex-reference): Permits entries with comma after last field. (bibtex-font-lock-keywords): Enhanced to support new field-name characters (suggested by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-field-name): Now numbers (not as the first sign), dashes, and underscores are allowed (suggested by Martin Maechler <maechler@stat.math.ethz.ch> and Oren Patashnik <opbibtex@labrea.Stanford.EDU>). (bibtex-make-field): Was broken on lines containing non-parenthesized entries (reported by Karl Eichwalder <ke@ke.Central.DE>). (bibtex-validate-buffer): Changed so that preamble references are ignored (same as string entries) (reported by Martin Maechler <maechler@stat.math.ethz.ch>). (bibtex-enclosing-reference-maybe-empty-head): New function to be used in case reference head may be empty. (bibtex-clean-entry, bibtex-pop-previous, bibtex-pop-next): Uses now bibtex-enclosing-reference-maybe-empty-head. (bibtex-mode): Added support for font-lock mode. (bibtex-font-lock-keywords): New variable with font-lock keywords for BibTeX mode. (bibtex-make-optional-field): Not longer interactive (suggested by Karl Eichwalder <karl@pertron.central.de>). (bibtex-maintain-sorted-entries): Set to nil, since it requires more user attention and more restricted files to have this set to t. (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Made buffer local, since it may depend on the buffer which preferences to use. (bibtex-validate-buffer): Looking for correct sort order only when bibtex-maintain-sorted-entries is non-nil. Put a comment in the `KNOWN BUGS' section about the quote-inside-quotes problem. (whole file): Changed string `true' in some documentation strings to `non-nil' (e.g. `if variable has a true/non-nil value'). (bibtex-mode-map): Changed `move/edit' to `bibtex-edit'. (bibtex-sort-entries): Now works correctly with `@String' entries inside BibTeX files (i.e. after the occurence of other references). (bibtex-validate-buffer): Inserted code which looks if entries are balanced (a single non-escaped quote inside braces was not detected till now, but bibtex-sort-entries stumbles about it). (bibtex-entry): bibtex-move-outside-of-entry is only called when bibtex-maintain-sorted-entries is nil (otherwise bibtex-find-entry-location determines the correct location). (bibtex-find-entry-location): Now uses binary search. As before, it assumes that the buffer is sorted without duplicates (but as before it is only called when bibtex-maintain-sorted-entries is t). Ignores `@String' entries if told so via variable bibtex-sort-ignore-string-entries. (bibtex-clean-entry): Respect bibtex-maintain-sorted-entries when inserting autokey. (bibtex-validate-buffer): Searching whole buffer for duplicates and correct order is now done directly instead of calling bibtex-find-entry-location (since this is to be reprogrammed to use a binary search instead a sequential one). (bibtex-parse-keys): May now be called with an optional parameter which (if t) tells bibtex-parse-keys that it should abort if input is pending. (bibtex-mode): The instance of bibtex-parse-keys called in auto-save-mode-hook is now called with this new parameter set to t, so an auto-save caused by exceeding auto-save-interval is now aborted immediately if user is still typing. (bibtex-print-help-message, bibtex-clean-entry): Use now constant strings instead of custom ones. (bibtex-clean-entry): Changed the call of bibtex-enclosing-reference to a more specific call so entries without a key (here allowed) can be handled. (bibtex-reference-key): Cleared off parentheses (caused string entries enclosed by parentheses instead of braces to be not added to bibtex-completion-candidates). (bibtex-complete-string): Made it use bibtex-string. (bibtex-keys, bibtex-buffer-last-parsed-for-keys-tick): New buffer-local variables to make parsing of BibTeX buffer for reference keys (needed by TAB completion in minibuffer when entering key) more occasional. (bibtex-parse-keys): New function to parse for keys (functionality was partially included in bibtex-entry). (bibtex-entry): Changed to use bibtex-parse-keys. (bibtex-mode): Installs bibtex-parse-keys as an auto-save-mode-hook, so whole buffer is parsed at most when it is autosaved. (bibtex-clean-entry): Calls bibtex-parse-keys on the new entry, so bibtex-keys remains consistent for new entries that are finished by calling this function (most should). (bibtex-inside-field): Be independent on current setting of bibtex-field-right-delimiter (allows more intermixing between quotes and braces). (bibtex-make-field): Last change didn't make it work correctly when called non-interactively by bibtex-entry (fixed).
1995-12-13 20:26:13 +00:00
(forward-char -1)
(bibtex-beginning-of-entry)
(re-search-forward bibtex-reference-head)
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(if (not success)
(error
"New inserted reference yields duplicate key"))))))))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not called-by-reformat)
(save-excursion
(save-restriction
(narrow-to-region
(bibtex-beginning-of-entry) (bibtex-end-of-entry))
(bibtex-parse-keys t nil)
(run-hooks 'bibtex-clean-entry-hook)))))
(defun bibtex-fill-entry ()
"Fill current entry.
Realigns entry, so that every field starts on a separate line. Field
1997-08-22 02:23:24 +00:00
names appear in column `bibtex-field-indentation', field text starts in
column `bibtex-text-indentation' and continuation lines start here, too.
1997-08-22 02:23:24 +00:00
If `bibtex-align-at-equal-sign' is non-nil, align equal signs also."
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(interactive "*")
(let ((pnt (copy-marker (point)))
(end (copy-marker (bibtex-end-of-entry))))
(bibtex-beginning-of-entry)
(bibtex-delete-whitespace)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(indent-to-column bibtex-entry-offset)
(while (re-search-forward bibtex-field end t)
(let* ((begin-field
(copy-marker (match-beginning 0)))
(end-field
(copy-marker (match-end 0)))
(begin-name
(copy-marker (match-beginning bibtex-name-in-field)))
(end-name
(copy-marker (match-end bibtex-name-in-field))))
(goto-char begin-field)
(forward-char)
(bibtex-delete-whitespace)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(open-line 1)
(forward-char)
(indent-to-column
(+ bibtex-entry-offset bibtex-field-indentation))
(re-search-forward "[ \t\n]*=" end)
(replace-match "=")
(forward-char -1)
(if bibtex-align-at-equal-sign
(indent-to-column
(+ bibtex-entry-offset (- bibtex-text-indentation 2)))
(insert " "))
(forward-char)
(bibtex-delete-whitespace)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if bibtex-align-at-equal-sign
(insert " ")
(indent-to-column bibtex-text-indentation))
(while (re-search-forward "[ \t\n]+" end-field 'move)
(replace-match " "))
(bibtex-do-auto-fill)))
(if (looking-at ",")
(forward-char))
(bibtex-delete-whitespace)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(open-line 1)
(forward-char)
(indent-to-column bibtex-entry-offset)
(goto-char pnt)))
(defun bibtex-reformat (&optional additional-options called-by-convert-alien)
1997-08-22 02:23:24 +00:00
"Reformat all BibTeX entries in buffer or region.
With prefix argument, read options for reformatting from minibuffer.
With \\[universal-argument] \\[universal-argument] prefix argument, reuse previous answers (if any) again.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
If mark is active it reformats entries in region, if not in whole buffer."
(interactive "*P")
(let* ((pnt (point))
(use-previous-options
(and (equal (prefix-numeric-value additional-options) 16)
(or bibtex-reformat-previous-options
bibtex-reformat-previous-labels)))
(bibtex-entry-format
(if additional-options
(if use-previous-options
bibtex-reformat-previous-options
(setq
bibtex-reformat-previous-options
(delq
nil
(list
(if (or
called-by-convert-alien
(y-or-n-p
"Realign entries (recommended for files not created by BibTeX mode)? "))
'realign)
(if (y-or-n-p
"Remove empty optional and alternative fields? ")
'opts-or-alts)
(if (y-or-n-p
"Remove delimiters around pure numerical fields? ")
'numerical-fields)
(if (y-or-n-p (concat
(if bibtex-comma-after-last-field
"Insert"
"Remove")
" comma at end of entry? "))
'last-comma)
(if (y-or-n-p
"Replace double page dashes by single ones? ")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
'page-dashes)
(if (y-or-n-p
"Force delimiters? ")
'delimiters)
(if (y-or-n-p
"Unify case of entry types and field names? ")
'unify-case)))))
'(realign)))
(labels
(if additional-options
(if use-previous-options
bibtex-reformat-previous-labels
(setq
bibtex-reformat-previous-labels
(y-or-n-p "Generate automatically new reference labels? ")))))
bibtex-autokey-edit-before-use
(bibtex-sort-ignore-string-entries t)
(start-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-beginning)
(progn
(bibtex-beginning-of-first-entry)
(bibtex-skip-to-valid-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(point))))
(end-point
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(region-end)
(point-max)))
(valid-bibtex-entry
(concat
"[ \t\n]+\\(@[ \t]*\\("
(mapconcat
(lambda (type)
(concat "\\(" (car type) "\\)"))
bibtex-entry-field-alist
"\\|")
"\\)\\)")))
(save-restriction
(narrow-to-region start-point end-point)
(if (memq 'realign bibtex-entry-format)
(progn
(goto-char (point-min))
(while (re-search-forward valid-bibtex-entry nil t)
(replace-match "\n\\1"))))
(goto-char start-point)
(bibtex-progress-message "Formatting" 1)
(bibtex-map-entries
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(lambda (current)
(bibtex-progress-message)
(bibtex-clean-entry labels labels)
(if (memq 'realign bibtex-entry-format)
(progn
(bibtex-end-of-entry)
(bibtex-delete-whitespace)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(open-line 2)))))
(bibtex-progress-message 'done))
(if (and
labels
bibtex-maintain-sorted-entries
(not called-by-convert-alien))
(progn
(bibtex-sort-buffer)
(setq bibtex-keys nil)
(bibtex-parse-keys nil t t)))
(goto-char pnt)))
(defun bibtex-convert-alien (&optional do-additional-reformatting)
"Converts an alien BibTeX buffer to be fully usable by BibTeX mode.
If a file doesn't confirm with some standards used by BibTeX mode,
some of the high-level features of BibTeX mode won't be available.
1997-08-22 02:23:24 +00:00
This function tries to convert current buffer to confirm with these standards.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
With prefix argument DO-ADDITIONAL-REFORMATTING
non-nil, read options for reformatting entries from minibuffer."
(interactive "*P")
(message "Starting to validate buffer...")
(sit-for 1 nil t)
(goto-char (point-min))
(while (re-search-forward "[ \t\n]+@" nil t)
(replace-match "\n@"))
(message
"If errors occur, correct them and call `bibtex-convert-alien' again")
(sit-for 5 nil t)
(bibtex-autokey-names): Change number tag to integer. (bibtex-include-OPTkey): Add non-nil default :value for function, so that it can be selected. (bibtex-entry-format): Replace repeat with set. (bibtex-mode-hook): Change :type to 'hook. (bibtex-clean-entry-hook): Ditto. (bibtex-add-entry-hook): Ditto. (bibtex-autokey-before-presentation-hook): Change name to -> `bibtex-autokey-before-presentation-function' as it is not hook. (bibtex-autokey-get-namefield): Remove newlines unconditionally. (bibtex-autokey): Fixed prefix. (bibtex-user-optional-fields): Better `:type'. (bibtex-autokey-names): Better `:type' and doc-fix. (bibtex-mark-active): New function, taking care of Emacs variants. (bibtex-run-with-idle-timer): Ditto. (bibtex-mode-map): Change `[(control tab)]' to `[(meta tab)]'. (bibtex-autokey-get-yearfield): Changed to accept year when year field has field-delimiters. This is quick fix, there might be better solution. (bibtex-mode): Don't call idle timer with 0 seconds. (bibtex-mode): Call easy-menu-add. (bibtex-autokey-get-yearfield): Fixed problem with parsing the year field. (bibtex-comment-start): Font locking for comments added. (autokey-name-case-convert, autokey-titleword-case-convert): Replace autokey-preserve-case, adding flexibility to case conversion of author names and titlewords. (bibtex-autokey-get-titles): Non capitalized title words are used for key generation as well. (bibtex-member-of-regexp): Case is honoured for matches now. (bibtex-autokey-titleword-ignore): Added entries provide compatibility to former behaviour. (bibtex-autokey-titleword-ignore): Title words found in this list are always ignored (previously only at the beginning of the title). Replaces bibtex-autokey-titleword-first-ignore.
1998-02-16 05:42:08 +00:00
(if (let ((bibtex-mark-active)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
bibtex-maintain-sorted-entries)
(bibtex-validate))
(progn
(message "Starting to reformat entries...")
(sit-for 2 nil t)
(bibtex-reformat do-additional-reformatting t)
(if bibtex-maintain-sorted-entries
(progn
(message "Starting to sort buffer...")
(bibtex-sort-buffer)))
(goto-char (point-max))
(message "Buffer is now parsable. Please save it."))))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-complete-string ()
"Complete word fragment before point to longest prefix of a defined string.
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
If point is not after the part of a word, all strings are listed.
Remove surrounding delimiters if complete string could be expanded."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive "*")
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(bibtex-complete bibtex-strings t))
(defun bibtex-complete-key ()
"Complete word fragment before point to longest prefix of a defined key.
If point is not after the part of a word, all keys are listed. This
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
function is most useful in completing crossref entries."
(interactive "*")
(if (not bibtex-keys)
(bibtex-parse-keys nil t))
(bibtex-complete bibtex-keys))
1991-05-09 21:50:45 +00:00
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-Article ()
"Insert a new BibTeX @Article entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Article"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-Book ()
"Insert a new BibTeX @Book entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Book"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(defun bibtex-Booklet ()
"Insert a new BibTeX @Booklet entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Booklet"))
(defun bibtex-InBook ()
"Insert a new BibTeX @InBook entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "InBook"))
(defun bibtex-InCollection ()
"Insert a new BibTeX @InCollection entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "InCollection"))
(defun bibtex-InProceedings ()
"Insert a new BibTeX @InProceedings entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "InProceedings"))
(defun bibtex-Manual ()
"Insert a new BibTeX @Manual entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Manual"))
(defun bibtex-MastersThesis ()
"Insert a new BibTeX @MastersThesis entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "MastersThesis"))
(defun bibtex-Misc ()
"Insert a new BibTeX @Misc entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Misc"))
(defun bibtex-PhdThesis ()
"Insert a new BibTeX @PhdThesis entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "PhdThesis"))
(defun bibtex-Proceedings ()
"Insert a new BibTeX @Proceedings entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Proceedings"))
(defun bibtex-TechReport ()
"Insert a new BibTeX @TechReport entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "TechReport"))
(defun bibtex-Unpublished ()
"Insert a new BibTeX @Unpublished entry; see also `bibtex-entry'."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-entry "Unpublished"))
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(defun bibtex-String ()
"Insert a new BibTeX @String entry."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(if (not bibtex-keys)
(bibtex-parse-keys nil t))
(let ((key
(if (and
bibtex-maintain-sorted-entries
(not bibtex-sort-ignore-string-entries))
(completing-read
"String key: " bibtex-keys nil nil nil 'bibtex-key-history))))
(if (and
bibtex-maintain-sorted-entries
(not bibtex-sort-ignore-string-entries))
(bibtex-find-entry-location key)
(bibtex-move-outside-of-entry))
(indent-to-column bibtex-entry-offset)
(insert
(concat
"@String"
(bibtex-entry-left-delimiter)
(if (and
bibtex-maintain-sorted-entries
(not bibtex-sort-ignore-string-entries))
key)
" = "
(bibtex-field-left-delimiter)
(bibtex-field-right-delimiter)
(bibtex-entry-right-delimiter)
"\n"))
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(forward-line -1)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(forward-char
(if (and
bibtex-maintain-sorted-entries
(not bibtex-sort-ignore-string-entries))
(+ (length "@String{") (length key) (length " = {"))
(length "@String{")))))
(defun bibtex-Preamble ()
"Insert a new BibTeX @Preamble entry."
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(interactive)
(bibtex-move-outside-of-entry)
(bibtex-mode-map): Changed the binding of the C-TAB key, such that XEmacs will understand it, too. (bibtex-format-entry, bibtex-end-of-entry): Give specific error message if not on valid BibTeX entry. (bibtex-field-string-quoted): Small bug fix. Allow backslash followed by newline. (bibtex-reposition-window, bibtex-mark-entry): Two new functions, bound to M-C-l and M-C-h, respectively. (bibtex-reformat-previous-options, bibtex-reformat-previous-labels): New internal variables used by bibtex-reformat. (bibtex-clean-entry-hook): New hook to be called after entry has been cleaned. (bibtex-clean-entry): Run the hook bibtex-clean-entry-hook. (bibtex-entry-field-alist): Small bug fix. (bibtex-autokey-title-terminators): Made -- a terminator instead of ---. (bibtex-font-lock-keywords): Don't treat ALT prefixed entries as comments. (bibtex-entry): Fixed parameter list. This function is not intended to be called with required and optional fields as optional arguments anymore. (bibtex-generate-autokey): Now split into various small functions. (bibtex-autokey-names-stretch, bibtex-autokey-additional-names): New variables used by bibtex-generate-autokey. (bibtex-autokey-get-namefield, bibtex-autokey-get-names) (bibtex-autokey-demangle-name, bibtex-autokey-get-namelist) (bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring) (bibtex-autokey-get-titles, bibtex-autokey-get-titlelist): New helper functions for bibtex-generate-autokey. (bibtex-submit-bug-report): Report all variables. (bibtex-contline-indentation): New user option. (bibtex-entry-offset): Renamed from bibtex-entry-indentation. (bibtex-entry-field-alist): Used different order for some fields (as documented in btxdoc.tex). Changed one of the comment strings. (bibtex-mode-hook, bibtex-add-entry-hook): Add var doc. (bibtex-autokey-before-presentation-hook): New variable to be called before autokey presentation. (bibtex-generate-autokey): Call bibtex-autokey-before-presentation-hook. Doc fix. (bibtex-reference-key): Reincluded parentheses. Parentheses should be disallowed only in field constants. (bibtex-autokey-transcriptions): Fixed bug (two entries for `\o' while `\oe' entry was missing). (bibtex-entry-indentation): New variable to determine the indentation of all entries. (bibtex-move-outside-of-entry): Use `skip-chars-forward' instead of `re-search-forward'. (bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry): Renamed from beginning-of-first-bibtex-entry and beginning-of-last-bibtex-entry. Go to beginning of line, return point. (bibtex-do-auto-fill, bibtex-make-field, bibtex-entry) (bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'. (bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work with indented entries. (bibtex-count-entries, bibtex-sort-buffer, bibtex-validate, bibtex-kill-entry, bibtex-reformat): Use return value from bibtex-beginning-of-first-entry. (bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head' instead of a fixed string. (bibtex-beginning-of-entry, bibtex-end-of-entry): Now return point if called from a program. (bibtex-enclosing-field, bibtex-format-entry, bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode, bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer, bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry, bibtex-fill-entry): Use new return values of these functions. (bibtex-ispell-abstract): Bug fix (inherently by the change to bibtex-end-of-entry). (bibtex-field-history): New variable for history buffer of field name reading. (bibtex-make-field): Use completion. Object to completion are all standard fields defined for the current entry. Bound to `C-c C-f'. (bibtex-mode): Set `comment-start' and `comment-start-skip' to "@Comment ", `comment-column' to 0. (bibtex-autokey-transcriptions): New variable. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-change-strings): Use bibtex-autokey-transcriptions as default value. (bibtex-find-entry-location): Handle empty buffer. (bibtex-entry-delimiters): New variable to determine if entries shall be delimited by braces or parentheses. (bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New helper functions. (bibtex-entry, bibtex-String, bibtex-Preamble): Respect `bibtex-entry-delimiters'. (bibtex-entry-format): Doc fix. (bibtex-reference-key, bibtex-field-const): Removed parentheses from allowed characters. (bibtex-end-of-entry): Better handling of incorrect preambles. (bibtex-validate): Small change to avoid reparsing of errors, if you enter `compile-goto-error' in compilation buffer. (bibtex-progress-message): New function to show progress of some long-lasting functions in BibTeX mode by indicating percentage of done work. (bibtex-progress-lastperc, bibtex-progress-lastmes) (bibtex-progress-interval): New internal variables for `bibtex-progress-message'. (bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new function `bibtex-progress-message'. (current-line): New helper function to calculate current linenumber. Something like this should really be defined somewhere else in Emacs. (bibtex-validate): Changed to show all errors in buffer in a `compilation mode' buffer. If there are syntax errors, it aborts after the syntax check, since higher-level check functions rely on the syntactical correctness of buffer. If called from another lisp function (as `bibtex-convert-alien') the return value shows whether validating has been successful. Fixed bug which made checking for absent required fields work incorrectly. (bibtex-parse-keys-timeout): Set to a value reasonable higher (twice as high) than `lazy-lock-stealth-time'. (bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes. (bibtex-buffer-last-parsed-tick): Renamed from bibtex-buffer-last-parsed-for-keys-tick and made it really buffer-local (bug fix). (bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick. (bibtex-parse-buffers-stealthily): New function which parses all BibTeX buffers if emacs has been idle an efficient amount of time. (bibtex-parse-idle-timer): New variable which stores whether idle timer for parsing already is installed. (bibtex-parse-keys): Make it callable verbosely. Returns now nil if it has been aborted. (bibtex-mode): Run the new function bibtex-parse-buffers-stealthily. (bibtex-generate-autokey): Changed the name part generation (bugfix). This function handles now correctly all three forms of BibTeX names, "First von Last", "von Last, First", "von Last, Jr, First". In every case the "Last" part is correctly extracted. If the "Last" part consists of more than one token only the first is used. Name fields spread over more than one line are no problem anymore. (bibtex-entry-format): Changed default value to exclude 'page-dashes. Modified documentation. (bibtex-autokey-name-change-strings) (bibtex-autokey-titleword-abbrevs) (bibtex-autokey-titleword-change-strings, bibtex-entry) (bibtex-validate): Doc fixes. (bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract. (bibtex-generate-autokey): Changed documentation. Small modification in calculating title field. (bibtex-mode): Included bibtex-ispell-entry into the list of `interesting' functions. (bibtex-kill-field): Bug fix (killing of first field in entry yielded error). (bibtex-string-file-path): New variable which defines the path to search for bibtex-string-files. It defaults to contents of environment variable BIBINPUTS. (bibtex-mode): Use this variable. (bibtex-next-field, bibtex-find-text): Will now work with string entries as well. (bibtex-mode-map): bibtex-complete-key wasn't bound correctly. (bibtex-complete): Fixed bug (used string entries defined in buffer as object to completion). (Menu): Use easymenu. More menu items for `BibTeX-Edit' menu. Use nested menus. (bibtex-field-kill-ring-max) (bibtex-entry-kill-ring-max): Two new variables substituting bibtex-kill-ring-max. (bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new variables substituting bibtex-kill-ring. (bibtex-field-kill-ring-yank-pointer) (bibtex-entry-kill-ring-yank-pointer): Two new variables substituting bibtex-kill-ring-yank-pointer. (bibtex-last-kill-command): New variable keeping the type of the last kill command. (bibtex-insert-current-kill): Clean distinction between the two BibTeX kill rings. (bibtex-kill-field): Use new variable bibtex-field-kill-ring. (bibtex-kill-entry): Use new variable bibtex-entry-kill-ring. (bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New internal variables like kill-ring and kill-ring-yank-pointer, but bibtex-kill-ring holds fields or complete reference entries instead of raw strings. (bibtex-kill-ring-max): New user option similar to kill-ring-max. (bibtex-kill-field): Renamed from bibtex-delete-field again. It now supports the new variable bibtex-kill-ring. (bibtex-copy-field-as-kill, bibtex-kill-entry) (bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New interactive functions, which work on the bibtex-kill-ring variable. (bibtex-insert-current-kill): New helper function to insert contents of bibtex-kill-ring in an appropriate way. (bibtex-make-field): New optional argument to tell the function if it was called by bibtex-yank. It operates slightly different then. (bibtex-find-text): New optional argument to tell the function if it was called by bibtex-make-field. It moves in this case to the end of the key if it was called on the reference head line. If it is called interactively on the head line, it works in an appropriate manner, too. (bibtex-enclosing-field): New optional argument to tell bibtex-enclosing-field not to print an error message if enclosing field isn't found, but to return nil in this case (t is returned otherwise). This is used by bibtex-find-text such that no error message is given if bibtex-find-text is called interactively in the key line of an entry. (bibtex-autokey-year-use-crossref-entry): New variable to determine if crossreferenced entry should be used for autokey generation, if year field of current entry is absent. (bibtex-generate-autokey): Use this new variable. (bibtex-include-OPTannote): Deleted (is set in bibtex-user-optional-fields). (bibtex-entry, bibtex-print-help-message): Removed support for bibtex-include-OPTannote. (bibtex-entry-format): New constant `inherit-booktitle' allowed. (bibtex-mode): Set value for font-lock-mark-block-function. (bibtex-font-lock-keywords): Changed to distinguish optional from ordinary fields. (bibtex-format-entry, bibtex-print-help-message) (bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps. (bibtex-delete-field): Changed from bibtex-delete-optional-or-alternative-field. Deletes now mandatory fields as well. (bibtex-mode): Changed documentation. (bibtex-entry-type-history, bibtex-key-history): New variables to use own histories in BibTeX buffers. (bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new variables. (bibtex-entry, bibtex-make-field): A function can now be used to generate a fields init string. (bibtex-include-OPTkey, bibtex-include-OPTannote) (bibtex-entry-field-alist): Changed documentation accordingly. (bibtex-mode): bibtex-parse-keys on start of mode is now abortable, too. (bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys isn't set correctly due to abortion of bibtex-parse-keys, this function is called now non-abortable. (bibtex-entry-field-alist): Small change in comments. (bibtex-find-entry-location): Bug fix: Insertion into completely empty buffer didn't work. (bibtex-user-optional-fields): Renamed from bibtex-mode-user-optional-fields. (bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message): Use bibtex-user-optional-fields. (bibtex-remove-delimiters): Bug fix: Only remove delimiting braces and not those inside fields. (skip-to-valid-bibtex-entry, bibtex-parse-keys) (bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate complex regexps outside of loops. (bibtex-mode): Changed documentation on how to convert third party buffers. (bibtex-convert-alien): New function to convert a buffer not created by BibTeX mode to a format, whichs enables all features of BibTeX mode. (bibtex-mode): Small bug fix for call to bibtex-parse-keys. (bibtex-mode): Bug fix for using bibtex-parse-keys. (bibtex-mode): Used other policy to initiate the first call of bibtex-parse-keys. This avoids unnecessary double call if Font Lock mode is chosen for buffer at startup. (bibtex-String, bibtex-Preamble): Renamed from bibtex-string and bibtex-preamble. (bibtex-String): If bibtex-maintain-sorted-entries and bibtex-sort-ignore-string-entries are both non-nil, read string key from minibuffer (with completion) and insert entry at correct location (as for normal entries). (bibtex-autokey-titleword-first-ignore) (bibtex-autokey-titleword-abbrevs): Changed documentation: case of regexps doesn't matter anymore. (bibtex-field-const, bibtex-reference-key): Simplified to not contain uppercase letters. (member-of-regexp, assoc-of-regexp): Ignore case of regexp. (map-bibtex-entries): Call function not for every syntactical correct entry, but only for entries with known type. (map-bibtex-entries, skip-to-valid-bibtex-entry) (bibtex-flash-head, bibtex-enclosing-field) (bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry) (bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys) (bibtex-ispell-abstract, bibtex-sort-buffer) (bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters) (bibtex-delete-optional-or-alternative-field, bibtex-pop) (bibtex-clean-entry, bibtex-print-help-message): Make them work regardless of user's value of case-fold-search. (bibtex-generate-autokey): Use bibtex-cfield for generating the year field regexp. (bibtex-parse-keys): Only gather keys of known (and not of syntactical correct) entries. (bibtex-end-of-entry): Only report an "unknown entry" message if called interactively. (bibtex-sort-ignore-string-entries): Renamed back from bibtex-sort-ignore-string-and-preamble. Of course, preambles are always ignored, since they have no key at all. (bibtex-string): Slightly less complex regexp. (skip-to-valid-bibtex-entry): New helper function to skip forward (or backward) to beginning of next syntactical correct known BibTeX entry, if not already there. Respects bibtex-sort-ignore-string-entries. (map-bibtex-entries): Bug fix: It wasn't called for string entries even if bibtex-sort-ignore-string-entries was nil. (beginning-of-last-bibtex-entry): New helper function to go to last entry in buffer. (bibtex-end-of-entry): Bug fix: Now works with string and preamble entries as well. (bibtex-sort-buffer): Renamed from bibtex-sort-entries. Simplified by using new function skip-to-valid-bibtex-entry. Now only known entries are checked. (bibtex-find-entry-location): Simplified by using new functions skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry. Only known entries are used to determine location. (bibtex-validate): Now checks string entries, too. (bibtex-move-outside-of-entry): Don't use forward-paragraph, but bibtex-end-of-entry. (bibtex-end-of-entry): Don't use forward-sexp anymore, since this fails on entries with non-escaped souble-quotes. Use search-bibtex-reference instead (though it is slower, it is more reliable). (bibtex-ispell-abstract): Use normal regexps created by bibtex-cfield instead of special ones. (beginning-of-first-bibtex-entry): No warning on empty buffer. (bibtex-validate): Bug fix. Syntactical check didn't work, since due to a bug all entries were simply skipped. (bibtex-mode): Doc fix. (bibtex-delete-optional-or-alternative-field): Renamed from bibtex-kill-optional-or-alternative-field. (bibtex-delete-optional-or-alternative-field, bibtex-empty-field): Use delete-region, not kill-region. (bibtex-clean-entry): New second argument called-by-reformat indicates if bibtex-clean-entry was called by reformat. Don't try to find correct buffer position for newly generated key and don't call bibtex-parse-keys in this case. (map-bibtex-entries): Bugfix (missed first entry in buffer, died on entries with `@' in other than first column). (beginning-of-first-bibtex-entry, bibtex-format-entry) (bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry): Changed to allow BibTeX entries to start in a column different from 1 (but still for speed reasons only whitespace is allowed prior to the `@' on the same line. (map-bibtex-entries): Call it for known BibTeX entries only. This allows entries as @Comment{...} which follow no specific structure without breaking the validation functions. (bibtex-validate): Check syntactical structure for known entries only. (bibtex-autokey-abbrev): Sped up and changed to allow a length of zero. (bibtex-entry-format): Remove option `month-strings'. (bibtex-validate): If given a prefix argument, check for questionable month fields. (bibtex-generate-autokey): Use normal regexps created by bibtex-cfield instead of special ones. (bibtex-hide-entry-bodies): Sped up by using subst-char-in-region instead of using replace-regexp or replace-match. (bibtex-find-entry-location): A bug had been introduced by using search-bibtex-reference instead of re-search-forward (fixed). (bibtex-field-delimiters): Renamed from bibtex-field-delimiter. (bibtex-entry-format): Constant empty-opts renamed to empty-opts-or-alts. (bibtex-remove-delimiters): Renamed from bibtex-remove-double-quotes-or-braces. (bibtex-reformat): New function. (bibtex-fill-entry): New function to refill entry. (bibtex-mode-map): Defined key for bibtex-fill-entry. (bibtex-field-delimiter): Substitutes variables bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-field-left-delimiter, bibtex-field-right-delimiter): New helper functions. (bibtex-make-field, bibtex-pop): Use new variable bibtex-field-delimiter. (bibtex-empty-field, bibtex-string): Use new functions bibtex-field-left-delimiter and bibtex-field-right-delimiter. (bibtex-predefined-month-strings): New variable. (bibtex-predefined-strings): Use bibtex-predefined-month-strings. (bibtex-submit-bug-report): Use new variables bibtex-field-delimiter and bibtex-predefined-month-strings. (bibtex-entry-format): Substitutes variable bibtex-clean-entry-zap-empty-opts-or-alts. Various types of formatting options are available (see variable documentation). (bibtex-format-entry): New function doing the formatting of entries. Taken from bibtex-clean-entry and enhanced to support new variable bibtex-entry-format. (delete-whitespace): New helper function used by bibtex-format-entry. (bibtex-clean-entry): Call new function bibtex-format-entry. (bibtex-submit-bug-report): Use bibtex-entry-format instead of bibtex-clean-entry-zap-empty-opts-or-alts. (bibtex-do-auto-fill): New function to perform auto-filling in BibTeX mode. In fact, this is the old function bibtex-auto-fill-function. (bibtex-mode): Don't set fill-prefix anymore, but use new function bibtex-do-auto-fill. (bibtex-find-entry-location): Fixed bug (when bibtex-maintain-sorted-entries was non-nil, an entry with a key greater than all other keys wasn't inserted in the correct place). (bibtex-mode): Don't use bibtex-auto-fill-function anymore, but use directly variable fill-prefix. (bibtex-find-entry-location): Fixed bug (on duplicate keys, point must move to beginning of entry, so that bibtex-entry works correctly). (bibtex-complete): Fixed bug (parameter string-list was mistakenly altered by the function itself). (bibtex-mode-map): Bind bibtex-complete-key to C-TAB. (bibtex-validate): Renamed from bibtex-validate-buffer since it can acts on region if active. Use search-bibtex-reference. (search-bibtex-reference): New function to be used in places where prior a re-search-{forward|backward} for bibtex-reference or something alike was used. This function is necessary due to the new limit of failure stack size in 19.32 and above. (bibtex-enclosing-reference-maybe-empty-head) (bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate): Use new function search-bibtex-reference. (bibtex-pop, bibtex-clean-entry): Small change due to change in bibtex-enclosing-reference-maybe-empty-head. (bibtex-reference-infix, bibtex-reference-postfix): New constants necessary due to splitting bibtex-reference. (bibtex-reference): Deleted. (bibtex-type-in-reference, skip-whitespace-and-comments): Deleted. (bibtex-mode): Don't turn auto-fill-mode on. Use new variable normal-auto-fill-function. (bibtex-field-string): Simplified. (bibtex-mode-syntax-table): Changed syntax of double-quote back to quote syntax. (bibtex-complete): New generic function for interface functions bibtex-complete-string and bibtex-complete-key. (bibtex-complete-key): New function. (bibtex-sort-ignore-string-and-preamble): Renamed from bibtex-sort-ignore-string-entries. (map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble and ignore preamble entries as well. (bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries): Use bibtex-sort-ignore-string-and-preamble. (bibtex-count-entries): New function to count entries in buffer or region. (bibtex-comma-after-last-field): New variable to decide if comma should be inserted at end of last field. (bibtex-entry): Support new variable bibtex-comma-after-last-field. (bibtex-field-indentation, bibtex-text-indentation): Two new user options (replacing the former constants bibtex-field-alignment and bibtex-text-alignment). (bibtex-align-at-equal-sign): New user option. (bibtex-auto-fill-function, bibtex-make-field) (bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables. (bibtex-validate-buffer): Now only checks region if mark is active. With optional argument checks if required fields are missing, too. (bibtex-mode): Added support for imenu. (bibtex-entry-field-alist) (bibtex-mode-user-optional-fields): Modified syntax to allow preinitialization of fields. (bibtex-make-field, bibtex-make-optional-field): Support preinitialization of fields. (bibtex-autokey-prefix-string) (bibtex-autokey-preserve-case): New variables to support bibtex-generate-autokey. (bibtex-generate-autokey): Use new variables. (bibtex-field-const, bibtex-reference-type) (bibtex-reference-key): Changed to match the (according to Oren Patashnik) allowed characters. (bibtex-clean-entry-zap-empty-opts-or-alts): Renamed from bibtex-clean-entry-zap-empty-opts. (bibtex-entry-field-alist): Slightly modified syntax to support alternative fields needed for Book and InBook references. (bibtex-font-lock-keywords, bibtex-print-help-message) (bibtex-make-field, bibtex-pop, bibtex-clean-entry): Support ALT prefixed entries. (bibtex-mode): Documented new ALT prefixed fields. (bibtex-make-optional-field): Modified to give only field name as arg to bibtex-make-field. (bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field): Renamed from bibtex-remove-OPT and bibtex-kill-optional-field, respectively. Modified to support ALT prefixes. (bibtex-enclosing-field, bibtex-print-help-message): Speed up things by not using bibtex-enclosing-regexp anymore. (bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
(indent-to-column bibtex-entry-offset)
(insert
"@Preamble"
(bibtex-entry-left-delimiter)
(bibtex-entry-right-delimiter)
"\n")
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(forward-line -1)
(forward-char 10))
1991-05-09 21:50:45 +00:00
;; Make BibTeX a Feature
(bibtex-string, bibtex-preamble): Use forward-line. (sort-subr): Don't call autload for this--that's done in loaddefs.el. (bibtex-mode): Add autoload cookie. Changed keybinding for bibtex-print-help-message (from \C-ch to \C-c?). Therefore, describe-mode is not longer on \C-c?. Also, changed prefix \C-cn for bibtex-narrow functions to \C-c\C-r. (bibtex-string-files): Changed documentation. (bibtex-mode-map): Inscriptions of menu bar changed from "Entry Types" to "Entry-Types" and "Bibtex Edit" to "BibTeX-Edit". (bibtex-string-files): Changed documentation. (bibtex-mode): If environment variable BIBINPUTS isn't defined, string files are searched in the current directory. (bibtex-completion-candidates): Now buffer-local to allow evaluation of different bibtex-string-files in different buffers. (bibtex-autokey-edit-before-use, bibtex-clean-entry): New variable that determines, if the user is allowed to edit auto-generated reference keys before they are used. (bibtex-generate-autokey, bibtex-clean-entry): New function to generate an autokey if necessary. (bibtex-autokey-names, bibtex-autokey-name-change-strings, bibtex-autokey-name-length, bibtex-autokey-name-separator, bibtex-autokey-year-length, bibtex-autokey-titlewords, bibtex-autokey-title-terminators, bibtex-autokey-titlewords-stretch, bibtex-autokey-titleword-first-ignore, bibtex-autokey-titleword-abbrevs, bibtex-autokey-titleword-change-strings, bibtex-autokey-titleword-length, bibtex-autokey-titleword-separator, bibtex-autokey-name-year-separator, bibtex-autokey-year-title-separator): New variables related to bibtex-generate-autokey. (bibtex-find-entry-location): Optional second parameter maybedup to tell it that entering a duplicate entry isn't to report by an error but by the return value of the function (necessary for bibtex-clean-entry to find the correct position of an entry with an autogenerated key without disturbing the user with unwanted messages). (bibtex-help-message): New variable to avoid printing of help messages in the echo area. (assoc-of-regexp): New function to match an alist of regexps. (bibtex-string-files, bibtex-completion-candidates, bibtex-mode): New variables to allow bibtex-complete-string to work on strings initialized from a variable and from @String definitions in a list of files, too. (bibtex-predefined-strings, bibtex-entry-field-alist): Changed to user options. (bibtex-mode): Changed doc string. (many functions and variables): Changed documentation strings of variables and functions to hold a complete sentence in the first line. (bibtex-print-help-message): Now line dependent and reports if it is called outside a BibTeX field. (validate-bibtex-buffer): Completely rewritten to validate, if buffer is syntactically correct. (find-bibtex-duplicates): Moved into validate-bibtex-buffer. (ispell-abstract, bibtex-ispell-abstract, ispell-bibtex-entry, bibtex-ispell-entry, beginning-of-bibtex-entry, bibtex-beginning-of-entry, end-of-bibtex-entry, bibtex-end-of-entry, hide-bibtex-entry-bodies, bibtex-hide-entry-bodies, narrow-to-bibtex-entry, bibtex-narrow-to-entry, sort-bibtex-entries, bibtex-sort-entries, validate-bibtex-buffer, bibtex-validate-buffer, find-bibtex-entry-location, bibtex-find-entry-location): All interactive functions are renamed, so that any interface function begins with "bibtex-". Mapping: ispell-abstract --> bibtex-ispell-abstract ispell-bibtex-entry --> bibtex-ispell-entry beginning-of-bibtex-entry --> bibtex-beginning-of-entry end-of-bibtex-entry --> bibtex-end-of-entry hide-bibtex-entry-bodies --> bibtex-hide-entry-bodies narrow-to-bibtex-entry --> bibtex-narrow-to-entry sort-bibtex-entries --> bibtex-sort-entries validate-bibtex-buffer --> bibtex-validate-buffer find-bibtex-entry-location --> bibtex-find-entry-location (bibtex-maintain-sorted-entries, bibtex-sort-ignore-string-entries): Default is now t. (bibtex-complete-string): String list is built from additional string list bibtex-predefined-string and current strings in file. (string-equalp): Deleted and substituted by string-equal. (assoc-string-equalp): Renamed to assoc-ignore-case. (bibtex-entry): Reference key can be entered with completion. All reference keys that are defined in buffer and all labels that appear in crossreference entries are object to completion. (Entry types): Changed order of entries in menu "entry types". (bibtex-entry-field-alist): Changed order of entries slightly to be more conform with standard BibTeX style layouts. (bibtex-mode-map): Uniform keybindings for \C-c\C-e prefix (often used types on control keys, sometimes used types on normal keys, rarely used types on shift keys, almost never used types on meta keys). (bibtex-mode-map): Function narrow-to-bibtex-entry and counterpart widen and function hide-bibtex-entry-bodies and counterpart show-all bounded to appropriate local keys. (bibtex-abbrev-table): Deleted (bibtex-current-entry-label, put-string-on-kill-ring): Deleted (AUCTeX provides all the functionality needed for citation completion). (bibtex-enclosing-reference, bibtex-pop-previous, bibtex-pop-next, bibtex-clean-entry): Hacked for speed (bibtex-pop-previous and bibtex-pop-next were to slow for larger BibTeX files). (bibtex-pop-previous, bibtex-pop-next): Delimiters from previous or next entry are changed to actual delimters if necessary. (bibtex-entry): Fixed bug (False entry wasn't reported in error message if bibtex-entry was called with undefined reference name). (bibtex-entry-field-alist, bibtex-entry, bibtex-make-field, bibtex-next-field, bibtex-clean-entry): Every reference entry now contains a comment in addition to the name of the reference. This comment appears in the echo area if you start editing that field (after calling bibtex-next-field). (bibtex-include-OPTcrossref, bibtex-entry): Changed bibtex-include-OPTcrossref from single boolean variable to hold a list of reference names which should have a crossref field. (bibtex-complete-word): New function, which completes word fragment before point to the longest prefix of predefined strings in the buffer in the same way that ispell-complete-word operates for words found in the dictionary. (bibtex-reference-head): Start of bibtex-reference-head changed from "^[ \t]*\\(" to "^\\( \\|\t\\)*\\(" (bibtex-pop-previous and bibtex-pop-next didn't work, probably due to a bug in re-search-forward). (several functions): Added support for {} as field delimiters (better than '"' for accented characters. (bibtex-clean-entry): If optional field crossref is empty or missing, former optional fields (if bibtex-include-OPTcrossref was t) are necessary again. bibtex-clean-entry complains if they are empty but not if they are missing, so you can intenionally omit them, e. g. for a pseudo @Journal entry (needed for crossreferences) made out of an @article with missing non-optional fields. Menu bar entries aren't centered anymore.
1994-12-23 04:18:29 +00:00
(provide 'bibtex)
1991-05-09 21:50:45 +00:00
;;; bibtex.el ends here