Commit graph

64 commits

Author SHA1 Message Date
Dave Love
b4a64de468 (bibtex-autokey-before-presentation-function): Fix :type. 2001-02-07 23:30:40 +00:00
Gerd Moellmann
f9bd4abe62 (bibtex-mode): Replaced manual splitting of path
at ':' characters by call to split-string.

Added RCS version identification.

Some temporary comments removed.
(bibtex-field-name, bibtex-entry-type): Made the relationship
explicit.
(bibtex-field-const): Allow capital letters.
(bibtex-start-of-string): Deleted because unused.

Unified some nomenclature.  We no longer
use the term 'reference' to describe a bibtex entry as a whole.
Further, reference keys are no longer called 'labels'.
(bibtex-keys): Renamed to bibtex-reference-keys.
(bibtex-reformat-previous-labels): Renamed to
bibtex-reformat-previous-reference-keys.
(bibtex-reference-type): Renamed to bibtex-entry-type.
(bibtex-reference-head): Renamed to bibtex-entry-head.
(bibtex-reference-maybe-empty-head): Renamed to
bibtex-entry-maybe-empty-head.
(bibtex-key-in-reference): Renamed to bibtex-key-in-entry.
(bibtex-search-reference): Renamed to bibtex-search-entry.
(bibtex-enclosing-reference-maybe-empty-head): Renamed to
bibtex-enclosing-entry-maybe-empty-head.
(bibtex-entry-field-alist, bibtex-entry-head,
bibtex-font-lock-keywords, bibtex-skip-to-valid-entry,
bibtex-map-entries, bibtex-search-entry,
bibtex-enclosing-entry-maybe-empty-head, bibtex-format-entry,
bibtex-generate-autokey, bibtex-parse-keys, bibtex-pop, bibtex-mode,
bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message,
bibtex-make-field, bibtex-end-of-entry, bibtex-sort-buffer,
bibtex-find-entry-location, bibtex-validate, bibtex-find-text,
bibtex-kill-entry, bibtex-clean-entry, bibtex-reformat,
bibtex-complete-key, bibtex-String) : Use the new nomenclature.

(bibtex-strings, bibtex-keys): Removed redundant
comment.
(bibtex-format-field-delimiters): New function, functionality
extracted from bibtex-format-entry.
(bibtex-autokey-get-yearfield-digits): New function, functionality
extracted from bibtex-autokey-get-yearfield.

Completely reimplemented parsing of bibtex
entries in order to avoid stack overflow in the regexp matcher if
field contents become large.
(bibtex-cfield, bibtex-name-in-cfield, bibtex-text-in-cfield,
bibtex-field-string-part-not-braced,
bibtex-field-string-part-no-inner-braces,
bibtex-field-string-part-1-inner-brace,
bibtex-field-string-part-2-inner-braces,
bibtex-field-string-part-3-inner-braces, bibtex-field-string-braced,
bibtex-field-string-quoted, bibtex-field-string,
bibtex-field-string-or-const, bibtex-field-text, bibtex-field,
bibtex-name-in-field, bibtex-text-in-field, bibtex-reference-infix,
bibtex-string, bibtex-key-in-string, bibtex-text-in-string): Deleted
as parsing is now performed by the following functions.
(bibtex-parse-nested-braces, bibtex-parse-field-string-braced,
bibtex-parse-quoted-string, bibtex-parse-field-string-quoted,
bibtex-parse-field-string, bibtex-search-forward-field-string,
bibtex-parse-association, bibtex-field-name-for-parsing,
bibtex-parse-field-name, bibtex-parse-field-text, bibtex-parse-field,
bibtex-search-forward-field, bibtex-search-backward-field,
bibtex-start-of-field, bibtex-end-of-field,
bibtex-start-of-name-in-field, bibtex-end-of-name-in-field,
bibtex-start-of-text-in-field, bibtex-end-of-text-in-field,
bibtex-parse-string-prefix, bibtex-parse-string-postfix,
bibtex-parse-string, bibtex-search-forward-string,
bibtex-search-backward-string, bibtex-start-of-string,
bibtex-end-of-string, bibtex-start-of-reference-key-in-string,
bibtex-end-of-reference-key-in-string, bibtex-start-of-text-in-string,
bibtex-end-of-text-in-string): New functions for the parsing of bibtex
entries.  Instead of reporting the results of the parsing by
match-beginning or match-end, these functions return data structures
that hold the corresponding positions.
(bibtex-enclosing-field): Changed to also report field boundaries by
return values rather than by match-beginning or match-end.  The
following functions have been adapted to use the new parsing
functions.
(bibtex-skip-to-valid-entry, bibtex-search-reference,
bibtex-enclosing-field, bibtex-format-entry,
bibtex-autokey-get-namefield, bibtex-autokey-get-titlestring,
bibtex-parse-keys, bibtex-complete, bibtex-pop, bibtex-mode,
bibtex-print-help-message, bibtex-end-of-entry,
bibtex-ispell-abstract, bibtex-validate, bibtex-next-field,
bibtex-find-text, bibtex-remove-OPT-or-ALT, bibtex-remove-delimiters,
bibtex-kill-field, bibtex-empty-field, bibtex-fill-entry): Use the new
method for parsing.
(bibtex-assoc-of-regexp, bibtex-skip-to-valid-entry,
bibtex-map-entries, bibtex-flash-head,
bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry,
bibtex-autokey-change, bibtex-autokey-get-namefield,
bibtex-autokey-get-names, bibtex-autokey-get-titlestring,
bibtex-autokey-get-titles, bibtex-parse-keys, bibtex-pop, bibtex-mode,
bibtex-end-of-entry, bibtex-ispell-abstract, bibtex-sort-buffer,
bibtex-validate, bibtex-remove-OPT-or-ALT, bibtex-remove-delimiters,
bibtex-kill-field, bibtex-kill-entry): Use let* instead of let in
order to make the new binding of case-fold-search immediately
visible.

Copyright notice is up to date.
Added constant 'bibtex-maintainer-salutation.

(bibtex-mode): use with-temp-buffer rather
than make-temp-name, use match-string-no-properties and eliminate
a quadratic behavior when building bibtex-strings.

(bibtex-reference-key): Accept string entries whose
reference key contains upper case letters.

(bibtex-reference-head): Allow entries to start with
a new line.

Hiding of entry bodies is not longer provided by
bibtex.el directly.  Instead the hideshow package can be used.
Added a special bibtex entry to hs-special-modes-alist.
(bibtex-hs-forward-sexp): Added for hideshow.el.

(bibtex-entry-field-alist): Added booktitle field to
proceedings entry type (for cross referencing). Thanks to
Wagner Toledo Correa for the suggestion.

Added `reftex-view-crossref-from-bibtex' to menu.
2000-02-15 09:38:09 +00:00
Gerd Moellmann
28f2ee6659 (bibtex-hs-forward-sexp): Added to support
using the hideshow package.
(hs-special-modes-alist): Added entry for bibtex to allow the use
of the hideshow package.
(bibtex-hide-entry-bodies): Deleted as hiding of entry bodies is
not longer provided by bibtex.el directly.  Instead the hideshow
package should be used.
(bibtex-mode-map, bibtex-edit-menu, bibtex-mode): Delete
references to bibtex-hide-entry-bodies.

Copyright notice is up to date.  Moved
maintainer information closer to the beginning of the bibtex.el
file.
(bibtex-maintainer-salutation): New constant.
bibtex-version): New constant.
bibtex-submit-bug-report): Use bibtex-version and
bibtex-maintainer-salutation.
(bibtex-entry-field-alist): Made booktitle field optional for
@inproceedings entries when crossreferenced.
(bibtex-entry-field-alist): Added booktitle field to proceedings
entry type (for cross referencing). Thanks to Wagner Toledo Correa
for the suggestion.
(bibtex-string-file-path): Fixed typo.
(bibtex-mode-map): Reserved the key `C-c &'
for reftex.el.
(bibtex-edit-menu): Added `reftex-view-crossref-from-bibtex'
to menu.
1999-12-05 13:24:44 +00:00
Richard M. Stallman
ab3b61015a (bibtex-mode): Use with-temp-buffer rather than make-temp-name, use
match-string-no-properties, and eliminate a quadratic behavior when
building bibtex-strings.
1999-08-29 21:20:20 +00:00
Karl Heuer
263230fae9 (bibtex-mode): `font-lock-mark-block-function'
should only be set for the bibtex buffer.
1999-06-27 23:34:54 +00:00
Karl Heuer
889c6ef5d9 (bibtex-reference-head): Allow entries to start with a newline. 1999-04-26 04:08:25 +00:00
Richard M. Stallman
e326384cda (bibtex-hide-entry-bodies): When entry
bodies are hidden, the last entry is no longer omitted.
1998-06-30 06:55:03 +00:00
Andreas Schwab
ed737bf113 (bibtex-include-OPTkey): Use `other' widget
type.
1998-06-24 09:25:09 +00:00
Richard M. Stallman
f0cb603469 Numerous documentation fixups.
Delete periods from error messages.

(bibtex-move-outside-of-entry): If outside an entry,
try not to move point, or only move it minimally.

(bibtex-autokey-get-titlestring): Omit delimiters.
1998-06-24 04:31:20 +00:00
Richard M. Stallman
d6f6135ea1 (bibtex-search-reference): store-match-data => set-match-data. 1998-03-14 04:54:19 +00:00
Simon Marshall
883212ce69 Changed font-lock-reference-face to font-lock-constant-face. 1998-02-20 14:58:27 +00:00
Richard M. Stallman
ab2d0cdb53 (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
Richard M. Stallman
24c5a085d6 (bibtex-autokey-year-length): Doc fix. 1998-02-08 21:05:11 +00:00
Dave Love
c0b08eb017 Use imenu-case-fold-search. 1997-12-12 17:10:08 +00:00
Karl Heuer
03dbb1e75a (bibtex-generate-autokey): Doc fix. 1997-12-09 22:43:32 +00:00
Richard M. Stallman
2231645f5e (bibtex-maintainer-address, bibtex-submit-bug-report):
New maintainer (Dirk Herrmann <D.Herrmann@tu-bs.de>).
1997-11-26 16:12:25 +00:00
Richard M. Stallman
5d05a34bae Comment change. 1997-08-31 17:18:41 +00:00
Richard M. Stallman
d0388eace9 Many doc fixes. 1997-08-22 02:23:24 +00:00
Richard M. Stallman
f754fb7b94 Customized. 1997-08-22 02:05:30 +00:00
Richard M. Stallman
8b3106fa32 (bibtex-kill-field, bibtex-find-text): Killing a field moves to the next line. 1997-06-30 21:25:37 +00:00
Richard M. Stallman
12ef05f47b Update copyright year. 1997-06-14 18:45:38 +00:00
Richard M. Stallman
55fe21fc27 (bibtex-delete-whitespace, bibtex-current-line)
(bibtex-assoc-of-regexp, bibtex-skip-to-valid-entry)
(bibtex-map-entries):
Renamed from delete-whitespace, current-line, assoc-of-regexp,
skip-to-valid-bibtex-entry, and map-bibtex-entries, respectively.
1997-06-14 17:30:43 +00:00
Richard M. Stallman
50e4b39ede (bibtex-mode-map): Changed the binding of the C-TAB
key, such that XEmacs will understand it, too.

(bibtex-format-entry, bibtex-end-of-entry): Give specific
error message if not on valid BibTeX entry.

(bibtex-field-string-quoted): Small bug fix.  Allow
backslash followed by newline.

(bibtex-reposition-window, bibtex-mark-entry): Two new
functions, bound to M-C-l and M-C-h, respectively.

(bibtex-reformat-previous-options, bibtex-reformat-previous-labels):
New internal variables used by bibtex-reformat.

(bibtex-clean-entry-hook): New hook to be called after
entry has been cleaned.
(bibtex-clean-entry): Run the hook bibtex-clean-entry-hook.

(bibtex-entry-field-alist): Small bug fix.
(bibtex-autokey-title-terminators): Made -- a terminator instead
of ---.
(bibtex-font-lock-keywords): Don't treat ALT prefixed entries as
comments.
(bibtex-entry): Fixed parameter list.  This function is not
intended to be called with required and optional fields as
optional arguments anymore.

(bibtex-generate-autokey): Now split into various
small functions.
(bibtex-autokey-names-stretch, bibtex-autokey-additional-names):
New variables used by bibtex-generate-autokey.
(bibtex-autokey-get-namefield, bibtex-autokey-get-names)
(bibtex-autokey-demangle-name, bibtex-autokey-get-namelist)
(bibtex-autokey-get-yearfield, bibtex-autokey-get-titlestring)
(bibtex-autokey-get-titles, bibtex-autokey-get-titlelist):
New helper functions for bibtex-generate-autokey.

(bibtex-submit-bug-report): Report all variables.

(bibtex-contline-indentation): New user option.
(bibtex-entry-offset): Renamed from bibtex-entry-indentation.

(bibtex-entry-field-alist): Used different order for
some fields (as documented in btxdoc.tex).  Changed one of the
comment strings.

(bibtex-mode-hook, bibtex-add-entry-hook): Add var doc.
(bibtex-autokey-before-presentation-hook): New variable to be
called before autokey presentation.
(bibtex-generate-autokey):
Call bibtex-autokey-before-presentation-hook.  Doc fix.

(bibtex-reference-key): Reincluded parentheses.
Parentheses should be disallowed only in field constants.

(bibtex-autokey-transcriptions): Fixed bug (two
entries for `\o' while `\oe' entry was missing).

(bibtex-entry-indentation): New variable to determine
the indentation of all entries.
(bibtex-move-outside-of-entry): Use `skip-chars-forward' instead
of `re-search-forward'.
(bibtex-beginning-of-first-entry, bibtex-beginning-of-last-entry):
Renamed from beginning-of-first-bibtex-entry and
beginning-of-last-bibtex-entry.  Go to beginning of line, return point.
(bibtex-do-auto-fill, bibtex-make-field, bibtex-entry)
(bibtex-String, bibtex-Preamble): Respect `bibtex-entry-indentation'.
(bibtex-beginning-of-entry, bibtex-end-of-entry): Make it work
with indented entries.
(bibtex-count-entries, bibtex-sort-buffer, bibtex-validate,
bibtex-kill-entry, bibtex-reformat): Use return value from
bibtex-beginning-of-first-entry.
(bibtex-clean-entry): Use `bibtex-reference-maybe-empty-head'
instead of a fixed string.

(bibtex-beginning-of-entry, bibtex-end-of-entry): Now
return point if called from a program.
(bibtex-enclosing-field, bibtex-format-entry,
bibtex-generate-autokey, bibtex-parse-keys, bibtex-mode,
bibtex-ispell-entry, bibtex-narrow-to-entry, bibtex-sort-buffer,
bibtex-find-entry-location, bibtex-validate, bibtex-clean-entry,
bibtex-fill-entry): Use new return values of these functions.
(bibtex-ispell-abstract): Bug fix (inherently by the change to
bibtex-end-of-entry).

(bibtex-field-history): New variable for history
buffer of field name reading.
(bibtex-make-field): Use completion.  Object to completion are all
standard fields defined for the current entry.  Bound to `C-c C-f'.
(bibtex-mode): Set `comment-start' and `comment-start-skip' to
"@Comment ", `comment-column' to 0.

(bibtex-autokey-transcriptions): New variable.
(bibtex-autokey-name-change-strings)
(bibtex-autokey-titleword-change-strings):
Use bibtex-autokey-transcriptions as default value.

(bibtex-find-entry-location): Handle empty buffer.

(bibtex-entry-delimiters): New variable to determine
if entries shall be delimited by braces or parentheses.
(bibtex-entry-left-delimiter, bibtex-entry-right-delimiter): New
helper functions.
(bibtex-entry, bibtex-String, bibtex-Preamble): Respect
`bibtex-entry-delimiters'.
(bibtex-entry-format): Doc fix.
(bibtex-reference-key, bibtex-field-const): Removed parentheses
from allowed characters.
(bibtex-end-of-entry): Better handling of incorrect preambles.

(bibtex-validate): Small change to avoid reparsing of
errors, if you enter `compile-goto-error' in compilation buffer.

(bibtex-progress-message): New function to show
progress of some long-lasting functions in BibTeX mode by
indicating percentage of done work.
(bibtex-progress-lastperc, bibtex-progress-lastmes)
(bibtex-progress-interval):
New internal variables for `bibtex-progress-message'.
(bibtex-parse-keys, bibtex-reformat, bibtex-validate): Use new
function `bibtex-progress-message'.
(current-line): New helper function to calculate current
linenumber.  Something like this should really be defined somewhere
else in Emacs.
(bibtex-validate): Changed to show all errors in buffer in a
`compilation mode' buffer.  If there are syntax errors, it aborts
after the syntax check, since higher-level check functions rely on
the syntactical correctness of buffer.  If called from another lisp
function (as `bibtex-convert-alien') the return value shows
whether validating has been successful.  Fixed bug which made
checking for absent required fields work incorrectly.
(bibtex-parse-keys-timeout): Set to a value reasonable higher
(twice as high) than `lazy-lock-stealth-time'.
(bibtex-member-of-regexp, assoc-of-regexp): Small cosmetic changes.

(bibtex-buffer-last-parsed-tick): Renamed from
bibtex-buffer-last-parsed-for-keys-tick and made it really
buffer-local (bug fix).
(bibtex-parse-keys): Make it use bibtex-buffer-last-parsed-tick.
(bibtex-parse-buffers-stealthily): New function which parses all
BibTeX buffers if emacs has been idle an efficient amount of time.
(bibtex-parse-idle-timer): New variable which stores whether idle
timer for parsing already is installed.
(bibtex-parse-keys): Make it callable verbosely.  Returns now nil
if it has been aborted.
(bibtex-mode): Run the new function bibtex-parse-buffers-stealthily.

(bibtex-generate-autokey): Changed the name part
generation (bugfix).  This function handles now correctly all three
forms of BibTeX names, "First von Last", "von Last, First", "von
Last, Jr, First".  In every case the "Last" part is correctly
extracted.  If the "Last" part consists of more than one token only
the first is used.  Name fields spread over more than one line are
no problem anymore.

(bibtex-entry-format): Changed default value to
exclude 'page-dashes.  Modified documentation.
(bibtex-autokey-name-change-strings)
(bibtex-autokey-titleword-abbrevs)
(bibtex-autokey-titleword-change-strings, bibtex-entry)
(bibtex-validate): Doc fixes.
(bibtex-mode-map): Bound `C-c $' to bibtex-ispell-abstract.
(bibtex-generate-autokey): Changed documentation.  Small
modification in calculating title field.
(bibtex-mode): Included bibtex-ispell-entry into the list of
`interesting' functions.
(bibtex-kill-field): Bug fix (killing of first field in entry
yielded error).

(bibtex-string-file-path): New variable which defines
the path to search for bibtex-string-files.  It defaults to
contents of environment variable BIBINPUTS.
(bibtex-mode): Use this variable.

(bibtex-next-field, bibtex-find-text): Will now work
with string entries as well.

(bibtex-mode-map): bibtex-complete-key wasn't bound
correctly.
(bibtex-complete): Fixed bug (used string entries defined in
buffer as object to completion).

(Menu): Use easymenu.  More menu items for
`BibTeX-Edit' menu.  Use nested menus.

(bibtex-field-kill-ring-max)
(bibtex-entry-kill-ring-max): Two new variables substituting
bibtex-kill-ring-max.
(bibtex-field-kill-ring, bibtex-entry-kill-ring): Two new
variables substituting bibtex-kill-ring.
(bibtex-field-kill-ring-yank-pointer)
(bibtex-entry-kill-ring-yank-pointer): Two new variables
substituting bibtex-kill-ring-yank-pointer.
(bibtex-last-kill-command): New variable keeping the type of the
last kill command.
(bibtex-insert-current-kill): Clean distinction between the two
BibTeX kill rings.
(bibtex-kill-field): Use new variable bibtex-field-kill-ring.
(bibtex-kill-entry): Use new variable bibtex-entry-kill-ring.

(bibtex-kill-ring, bibtex-kill-ring-yank-pointer): New
internal variables like kill-ring and kill-ring-yank-pointer, but
bibtex-kill-ring holds fields or complete reference entries
instead of raw strings.
(bibtex-kill-ring-max): New user option similar to kill-ring-max.
(bibtex-kill-field): Renamed from bibtex-delete-field again.  It
now supports the new variable bibtex-kill-ring.
(bibtex-copy-field-as-kill, bibtex-kill-entry)
(bibtex-copy-entry-as-kill, bibtex-yank, bibtex-yank-pop): New
interactive functions, which work on the bibtex-kill-ring
variable.
(bibtex-insert-current-kill): New helper function to insert
contents of bibtex-kill-ring in an appropriate way.
(bibtex-make-field): New optional argument to tell the function if
it was called by bibtex-yank.  It operates slightly different then.
(bibtex-find-text): New optional argument to tell the function if
it was called by bibtex-make-field.  It moves in this case to the
end of the key if it was called on the reference head line.  If it
is called interactively on the head line, it works in an
appropriate manner, too.
(bibtex-enclosing-field): New optional argument to tell
bibtex-enclosing-field not to print an error message if enclosing
field isn't found, but to return nil in this case (t is returned
otherwise).  This is used by bibtex-find-text such that no error
message is given if bibtex-find-text is called interactively in
the key line of an entry.

(bibtex-autokey-year-use-crossref-entry): New variable
to determine if crossreferenced entry should be used for autokey
generation, if year field of current entry is absent.
(bibtex-generate-autokey): Use this new variable.

(bibtex-include-OPTannote): Deleted (is set in
bibtex-user-optional-fields).
(bibtex-entry, bibtex-print-help-message): Removed support for
bibtex-include-OPTannote.

(bibtex-entry-format): New constant
`inherit-booktitle' allowed.

(bibtex-mode): Set value for
font-lock-mark-block-function.

(bibtex-font-lock-keywords): Changed to distinguish
optional from ordinary fields.
(bibtex-format-entry, bibtex-print-help-message)
(bibtex-remove-OPT-or-ALT, bibtex-pop): Used simpler regexps.

(bibtex-delete-field): Changed from
bibtex-delete-optional-or-alternative-field.  Deletes now mandatory
fields as well.
(bibtex-mode): Changed documentation.

(bibtex-entry-type-history, bibtex-key-history): New
variables to use own histories in BibTeX buffers.
(bibtex-entry, bibtex-clean-entry, bibtex-String): Use these new
variables.

(bibtex-entry, bibtex-make-field): A function can now
be used to generate a fields init string.
(bibtex-include-OPTkey, bibtex-include-OPTannote)
(bibtex-entry-field-alist): Changed documentation accordingly.

(bibtex-mode): bibtex-parse-keys on start of mode is
now abortable, too.
(bibtex-entry, bibtex-complete-key, bibtex-String): If bibtex-keys
isn't set correctly due to abortion of bibtex-parse-keys, this
function is called now non-abortable.

(bibtex-entry-field-alist): Small change in comments.

(bibtex-find-entry-location): Bug fix: Insertion into
completely empty buffer didn't work.

(bibtex-user-optional-fields): Renamed from
bibtex-mode-user-optional-fields.
(bibtex-submit-bug-report, bibtex-entry, bibtex-print-help-message):
Use bibtex-user-optional-fields.

(bibtex-remove-delimiters): Bug fix: Only remove
delimiting braces and not those inside fields.

(skip-to-valid-bibtex-entry, bibtex-parse-keys)
(bibtex-end-of-entry, bibtex-validate, bibtex-reformat): Calculate
complex regexps outside of loops.
(bibtex-mode): Changed documentation on how to convert third party
buffers.

(bibtex-convert-alien): New function to convert a
buffer not created by BibTeX mode to a format, whichs enables all
features of BibTeX mode.
(bibtex-mode): Small bug fix for call to bibtex-parse-keys.

(bibtex-mode): Bug fix for using bibtex-parse-keys.

(bibtex-mode): Used other policy to initiate the first
call of bibtex-parse-keys.  This avoids unnecessary double call if
Font Lock mode is chosen for buffer at startup.

(bibtex-String, bibtex-Preamble): Renamed from
bibtex-string and bibtex-preamble.
(bibtex-String): If bibtex-maintain-sorted-entries and
bibtex-sort-ignore-string-entries are both non-nil, read string
key from minibuffer (with completion) and insert entry at correct
location (as for normal entries).

(bibtex-autokey-titleword-first-ignore)
(bibtex-autokey-titleword-abbrevs): Changed documentation: case of
regexps doesn't matter anymore.
(bibtex-field-const, bibtex-reference-key): Simplified to not
contain uppercase letters.
(member-of-regexp, assoc-of-regexp): Ignore case of regexp.
(map-bibtex-entries): Call function not for every syntactical correct
entry, but only for entries with known type.
(map-bibtex-entries, skip-to-valid-bibtex-entry)
(bibtex-flash-head, bibtex-enclosing-field)
(bibtex-enclosing-reference-maybe-empty-head, bibtex-format-entry)
(bibtex-autokey-change, bibtex-generate-autokey, bibtex-parse-keys)
(bibtex-ispell-abstract, bibtex-sort-buffer)
(bibtex-find-entry-location, bibtex-validate, bibtex-remove-delimiters)
(bibtex-delete-optional-or-alternative-field, bibtex-pop)
(bibtex-clean-entry, bibtex-print-help-message): Make them work
regardless of user's value of case-fold-search.
(bibtex-generate-autokey): Use bibtex-cfield for generating the
year field regexp.
(bibtex-parse-keys): Only gather keys of known (and not of
syntactical correct) entries.
(bibtex-end-of-entry): Only report an "unknown entry" message if
called interactively.

(bibtex-sort-ignore-string-entries): Renamed back from
bibtex-sort-ignore-string-and-preamble.  Of course, preambles are
always ignored, since they have no key at all.
(bibtex-string): Slightly less complex regexp.
(skip-to-valid-bibtex-entry): New helper function to skip forward
(or backward) to beginning of next syntactical correct known
BibTeX entry, if not already there.  Respects
bibtex-sort-ignore-string-entries.
(map-bibtex-entries): Bug fix: It wasn't called for string entries
even if bibtex-sort-ignore-string-entries was nil.
(beginning-of-last-bibtex-entry): New helper function to go to
last entry in buffer.
(bibtex-end-of-entry): Bug fix: Now works with string and preamble
entries as well.
(bibtex-sort-buffer): Renamed from bibtex-sort-entries.  Simplified
by using new function skip-to-valid-bibtex-entry.  Now only known
entries are checked.
(bibtex-find-entry-location): Simplified by using new functions
skip-to-valid-bibtex-entry and beginning-of-last-bibtex-entry.
Only known entries are used to determine location.
(bibtex-validate): Now checks string entries, too.
(bibtex-move-outside-of-entry): Don't use forward-paragraph, but
bibtex-end-of-entry.

(bibtex-end-of-entry): Don't use forward-sexp anymore,
since this fails on entries with non-escaped souble-quotes.  Use
search-bibtex-reference instead (though it is slower, it is more
reliable).
(bibtex-ispell-abstract): Use normal regexps created by
bibtex-cfield instead of special ones.

(beginning-of-first-bibtex-entry): No warning on
empty buffer.

(bibtex-validate): Bug fix.  Syntactical check didn't
work, since due to a bug all entries were simply skipped.

(bibtex-mode): Doc fix.
(bibtex-delete-optional-or-alternative-field): Renamed from
bibtex-kill-optional-or-alternative-field.
(bibtex-delete-optional-or-alternative-field, bibtex-empty-field):
Use delete-region, not kill-region.
(bibtex-clean-entry): New second argument called-by-reformat
indicates if bibtex-clean-entry was called by reformat.  Don't try
to find correct buffer position for newly generated key and don't
call bibtex-parse-keys in this case.

(map-bibtex-entries): Bugfix (missed first entry in
buffer, died on entries with `@' in other than first column).
(beginning-of-first-bibtex-entry, bibtex-format-entry)
(bibtex-beginning-of-entry, bibtex-validate, bibtex-clean-entry):
Changed to allow BibTeX entries to start in a column different
from 1 (but still for speed reasons only whitespace is allowed
prior to the `@' on the same line.

(map-bibtex-entries): Call it for known BibTeX entries
only.  This allows entries as @Comment{...} which follow no
specific structure without breaking the validation functions.
(bibtex-validate): Check syntactical structure for known entries
only.

(bibtex-autokey-abbrev): Sped up and changed to allow
a length of zero.

(bibtex-entry-format): Remove option `month-strings'.
(bibtex-validate): If given a prefix argument, check for
questionable month fields.

(bibtex-generate-autokey): Use normal regexps created
by bibtex-cfield instead of special ones.
(bibtex-hide-entry-bodies): Sped up by using subst-char-in-region
instead of using replace-regexp or replace-match.
(bibtex-find-entry-location): A bug had been introduced by using
search-bibtex-reference instead of re-search-forward (fixed).

(bibtex-field-delimiters): Renamed from
bibtex-field-delimiter.
(bibtex-entry-format): Constant empty-opts renamed to
empty-opts-or-alts.
(bibtex-remove-delimiters): Renamed from
bibtex-remove-double-quotes-or-braces.
(bibtex-reformat): New function.

(bibtex-fill-entry): New function to refill entry.
(bibtex-mode-map): Defined key for bibtex-fill-entry.

(bibtex-field-delimiter): Substitutes variables
bibtex-field-left-delimiter and bibtex-field-right-delimiter.
(bibtex-field-left-delimiter, bibtex-field-right-delimiter): New
helper functions.
(bibtex-make-field, bibtex-pop): Use new variable
bibtex-field-delimiter.
(bibtex-empty-field, bibtex-string): Use new functions
bibtex-field-left-delimiter and bibtex-field-right-delimiter.
(bibtex-predefined-month-strings): New variable.
(bibtex-predefined-strings): Use bibtex-predefined-month-strings.
(bibtex-submit-bug-report): Use new variables
bibtex-field-delimiter and bibtex-predefined-month-strings.

(bibtex-entry-format): Substitutes variable
bibtex-clean-entry-zap-empty-opts-or-alts.  Various types of
formatting options are available (see variable documentation).
(bibtex-format-entry): New function doing the formatting of entries.
Taken from bibtex-clean-entry and enhanced to support new variable
bibtex-entry-format.
(delete-whitespace): New helper function used by bibtex-format-entry.
(bibtex-clean-entry): Call new function bibtex-format-entry.
(bibtex-submit-bug-report): Use bibtex-entry-format instead of
bibtex-clean-entry-zap-empty-opts-or-alts.
(bibtex-do-auto-fill): New function to perform auto-filling in
BibTeX mode.  In fact, this is the old function
bibtex-auto-fill-function.
(bibtex-mode): Don't set fill-prefix anymore, but use new function
bibtex-do-auto-fill.

(bibtex-find-entry-location): Fixed bug (when
bibtex-maintain-sorted-entries was non-nil, an entry with a key
greater than all other keys wasn't inserted in the correct place).

(bibtex-mode): Don't use bibtex-auto-fill-function
anymore, but use directly variable fill-prefix.

(bibtex-find-entry-location): Fixed bug (on duplicate
keys, point must move to beginning of entry, so that bibtex-entry
works correctly).

(bibtex-complete): Fixed bug (parameter string-list
was mistakenly altered by the function itself).

(bibtex-mode-map): Bind bibtex-complete-key to C-TAB.

(bibtex-validate): Renamed from bibtex-validate-buffer
since it can acts on region if active.  Use search-bibtex-reference.
(search-bibtex-reference): New function to be used in places where
prior a re-search-{forward|backward} for bibtex-reference or
something alike was used.  This function is necessary due to the
new limit of failure stack size in 19.32 and above.
(bibtex-enclosing-reference-maybe-empty-head)
(bibtex-sort-entries, bibtex-find-entry-location, bibtex-validate):
Use new function search-bibtex-reference.
(bibtex-pop, bibtex-clean-entry): Small change due to change in
bibtex-enclosing-reference-maybe-empty-head.
(bibtex-reference-infix, bibtex-reference-postfix): New constants
necessary due to splitting bibtex-reference.
(bibtex-reference): Deleted.
(bibtex-type-in-reference, skip-whitespace-and-comments): Deleted.

(bibtex-mode): Don't turn auto-fill-mode on.  Use new
variable normal-auto-fill-function.

(bibtex-field-string): Simplified.

(bibtex-mode-syntax-table): Changed syntax of
double-quote back to quote syntax.

(bibtex-complete): New generic function for interface
functions bibtex-complete-string and bibtex-complete-key.
(bibtex-complete-key): New function.

(bibtex-sort-ignore-string-and-preamble): Renamed from
bibtex-sort-ignore-string-entries.
(map-bibtex-entries): Use bibtex-sort-ignore-string-and-preamble
and ignore preamble entries as well.
(bibtex-mode, bibtex-submit-bug-report, bibtex-sort-entries):
Use bibtex-sort-ignore-string-and-preamble.
(bibtex-count-entries): New function to count entries in buffer or
region.

(bibtex-comma-after-last-field): New variable to
decide if comma should be inserted at end of last field.
(bibtex-entry): Support new variable bibtex-comma-after-last-field.

(bibtex-field-indentation, bibtex-text-indentation):
Two new user options (replacing the former constants
bibtex-field-alignment and bibtex-text-alignment).
(bibtex-align-at-equal-sign): New user option.
(bibtex-auto-fill-function, bibtex-make-field)
(bibtex-remove-OPT-or-ALT, bibtex-clean-entry): Support new variables.

(bibtex-validate-buffer): Now only checks region if
mark is active.  With optional argument checks if required fields
are missing, too.

(bibtex-mode): Added support for imenu.

(bibtex-entry-field-alist)
(bibtex-mode-user-optional-fields): Modified syntax to allow
preinitialization of fields.
(bibtex-make-field, bibtex-make-optional-field):
Support preinitialization of fields.

(bibtex-autokey-prefix-string)
(bibtex-autokey-preserve-case): New variables to support
bibtex-generate-autokey.
(bibtex-generate-autokey): Use new variables.

(bibtex-field-const, bibtex-reference-type)
(bibtex-reference-key): Changed to match the (according to Oren
Patashnik) allowed characters.

(bibtex-clean-entry-zap-empty-opts-or-alts): Renamed
from bibtex-clean-entry-zap-empty-opts.
(bibtex-entry-field-alist): Slightly modified syntax to support
alternative fields needed for Book and InBook references.
(bibtex-font-lock-keywords, bibtex-print-help-message)
(bibtex-make-field, bibtex-pop, bibtex-clean-entry):
Support ALT prefixed entries.
(bibtex-mode): Documented new ALT prefixed fields.
(bibtex-make-optional-field): Modified to give only field name as
arg to bibtex-make-field.
(bibtex-remove-OPT-or-ALT, bibtex-kill-optional-or-alternative-field):
Renamed from bibtex-remove-OPT and bibtex-kill-optional-field,
respectively.  Modified to support ALT prefixes.

(bibtex-enclosing-field, bibtex-print-help-message):
Speed up things by not using bibtex-enclosing-regexp anymore.
(bibtex-enclosing-regexp): Function deleted.
1997-06-10 17:58:43 +00:00
Richard M. Stallman
43a8874dac (assoc-ignore-case): Function deleted.
(bibtex-member-of-regexp): Renamed from member-of-regexp.
Call changed.
1997-05-08 06:02:42 +00:00
Richard M. Stallman
1b97fc6eb4 (bibtex-mode): Set normal-auto-fill-function locally;
don't set auto-fill-function.  Don't turn on Auto Fill mode.
1996-08-09 22:31:46 +00:00
Karl Heuer
af6fb89dbb (bibtex-reference-head): Allow spaces and tabs between
opening brace or paren and key.  Simplify regexp.
(bibtex-type-in-head, bibtex-key-in-head): Decrement.
(bibtex-mode): Use new function run-with-idle-timer instead of
auto-save-hook for periodically parsing keys.
(bibtex-mode-syntax-table, bibtex-autokey-name-change-strings,
bibtex-autokey-titleword-change-strings): Support non-escaped
double-quoted characters (as with german styles).
(bibtex-field-string-quoted): Disallow lines like
author = "Stefan Sch"of"
until BibTeX supports them.
1996-07-11 23:13:33 +00:00
Richard M. Stallman
8798879498 (bibtex-reference-head): Allow whitespace after the open paren. 1996-06-29 06:21:48 +00:00
Richard M. Stallman
31bc421006 (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
Richard M. Stallman
2f056143d0 Comment change. 1996-01-29 17:21:17 +00:00
Richard M. Stallman
27abea5aa8 (bibtex-font-lock-keywords, bibtex-mode):
Use word-syntax in patterns.

(bibtex-font-lock-keywords): Allow a more relaxed format
of the buffer and use more appropriate faces.
1996-01-16 16:37:54 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
2e282f9210 (bibtex-generate-autokey, bibtex-find-entry-location):
Doc fix.
1996-01-04 23:27:50 +00:00
Karl Heuer
0640d7bff7 (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
Richard M. Stallman
d5fbc7c77e (bibtex-maintain-sorted-entries): Make nil the default. 1995-08-05 00:50:26 +00:00
Richard M. Stallman
5c69dbfc01 Add keywords and comments as per conventions.
Changed almost all occurences of buffer-substring to
buffer-substring-no-properties..

(bibtex-find-entry-location, bibtex-clean-entry):
Added support to handle invalidate buffers in a more friendly manner.

(bibtex-make-field): Changed to be called either interactively with a
string (field name) or from Lisp with a list of two strings (FIELDNAME
COMMENT).
1995-07-27 22:52:02 +00:00
Karl Heuer
1def9aec53 (bibtex-mode-map): Fix capitalization in menu bar. 1995-05-30 22:37:49 +00:00
Richard M. Stallman
a9cb9b8010 (bibtex-find-text, bibtex-remove-double-quotes-or-braces):
Support both kind of delimiters (braces or quotes) regardless of the
value of bibtex-field-left-delimiter and bibtex-field-right-delimiter.
(bibtex-field-left-delimiter, bibtex-field-right-delimiter):
Made buffer-local.

(bibtex-beginning-of-entry): At the beginning of an
entry, leave point at the beginning of that entry instead of
moving to the beginning of the previous one.
(bibtex-end-of-entry): Outside an entry, now move to the end of
the *previous* entry (i.e. bibtex-beginning-of-entry and
bibtex-end-of-entry are now idempotent).
(bibtex-sort-entries, bibtex-clean-entry): Removed now obsolete
calls of bibtex-beginning-of-entry just before calls to
bibtex-end-of-entry.
(bibtex-clean-entry): Minor change to adapt to new behavior of
bibtex-beginning-of-entry.
1995-04-11 19:47:26 +00:00
Boris Goldowsky
ac0e96eb6e (bibtex-mode): Remove ^ from paragraph-start. 1995-03-01 15:43:27 +00:00
Richard M. Stallman
fa59ceb3f1 (bibtex-clean-entry): Killing text while editing
the autogenerated label in the minibuffer caused the killed text
to appear in front of the bibtex entry.
1995-01-06 21:48:36 +00:00
Richard M. Stallman
cb4ad359c3 (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
Richard M. Stallman
e230790596 (bibtex-mode-map): Delete binding for ".
Don't load in tex-insert-quote.
1994-12-04 14:37:24 +00:00
Karl Heuer
f709e2e130 (put-string-on-kill-ring): Delete this function.
(bibtex-current-entry-label): Use kill-new instead.
1994-09-08 17:44:42 +00:00
Richard M. Stallman
3d23eec081 (bibtex-mode): Set up comment-start locally. 1994-06-16 15:12:52 +00:00
Richard M. Stallman
274d138774 (bibtex-clean-entry): Back over close delimiter carefully. 1994-05-30 10:32:11 +00:00
Karl Heuer
8f1204db34 Update copyright. 1994-05-03 23:47:06 +00:00
Richard M. Stallman
7bdf031dc8 (bibtex-field-name, bibtex-field-const, bibtex-field-text):
Adapted to Emacs 19 regex rules.
(bibtex-reference): Removed one set of parentheses (a workaround).
1994-01-01 17:32:23 +00:00
Richard M. Stallman
088f8c7717 (hide-bibtex-entry-bodies): Don't use replace-regexp. 1993-12-23 04:54:37 +00:00
Richard M. Stallman
1d7158ce48 (bibtex-mode-map): Change C-c e to C-c C-b. 1993-08-14 03:36:02 +00:00
Richard M. Stallman
a857ed136a (bibtex-mode-map): Use tex-insert-quote, not TeX-... 1993-06-10 17:42:39 +00:00
Jim Blandy
eb8c3be94e Apply typo patches from Paul Eggert. 1993-06-09 11:59:12 +00:00