Commit graph

36 commits

Author SHA1 Message Date
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
Richard M. Stallman
93d3549919 Fix typos in previous change.
Add a few menu items.

(bibtex-name-alignment): Renamed from bibtex-name-alignement.
1993-06-07 20:06:34 +00:00
Richard M. Stallman
2798dfd629 Define 2 local menu-bar submaps.
(bibtex-x-help, bibtex-x-environment): Deleted.
1993-06-06 22:36:23 +00:00
Richard M. Stallman
81354e19ab (bibtex-mode): Add autoload. 1993-05-31 21:53:41 +00:00
Jim Blandy
6f680efba5 * bibtex.el (bibtex-string): Use \" instead of "" to get a double
quote inside a string.
	* vms-patch.el (print-region-function): Same.
1993-05-18 21:33:52 +00:00
Eric S. Raymond
9ae11a8907 Installed Aaron Larson's new bibtex.el. See the header comment for
details.
1993-04-28 21:19:21 +00:00
Eric S. Raymond
e41b2db1da Added or corrected Commentary sections 1993-03-22 03:27:18 +00:00
Richard M. Stallman
a1ddedc69d Update GPL version. 1993-02-10 07:08:53 +00:00
Eric S. Raymond
9750e079dd entered into RCS 1992-07-22 04:22:30 +00:00
Eric S. Raymond
f961a17c44 *** empty log message *** 1992-07-17 07:10:46 +00:00
Eric S. Raymond
e516799970 *** empty log message *** 1992-07-16 21:47:34 +00:00
Eric S. Raymond
c0274f385f *** empty log message *** 1992-05-30 23:54:21 +00:00
Jim Blandy
49116ac071 *** empty log message *** 1992-03-16 20:39:07 +00:00
Jim Blandy
d30bfc7692 *** empty log message *** 1992-02-22 21:47:46 +00:00
Jim Blandy
745bc783eb Initial revision 1991-05-09 21:50:45 +00:00