1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 05:31:01 -08:00
Commit graph

137 commits

Author SHA1 Message Date
John Paul Wallington
2c10c0f063 (bibtex-make-field): Fix typo. 2004-11-01 08:13:50 +00:00
Richard M. Stallman
3f3ed95928 (bibtex-make-field): Don't use interactive-p.
(bibtex-find-text): Likewise.
2004-11-01 07:35:47 +00:00
Stefan Monnier
e0dc0c55b0 Use `button's.
(bibtex-autokey-transcriptions): Translate TeX `\ ' to space.
(bibtex-reference-keys): Distinguish between header keys and crossref keys.
(bibtex-beginning-of-field): New function.
(bibtex-url-map): Remove.
(bibtex-font-lock-keywords): Use bibtex-font-lock-crossref.
(bibtex-font-lock-url-regexp): Assume that field names begin at
the beginning of a line.
(bibtex-font-lock-url): Simplify.  Do not use bibtex-enclosing-field.
Remove field delimiters.  Bugfix, point can be inside a field with a url.
Use bibtex-beginning-of-field.
(bibtex-font-lock-crossref, bibtex-button-action, bibtex-button): New funs.
(bibtex-mark-active, bibtex-run-with-idle-timer): Remove.
(bibtex-key-in-head): Simplify.
(bibtex-current-line): Use bolp.
(bibtex-parse-keys): Remove unused arg `add'.
Use bibtex-type-in-head and bibtex-key-in-head.
(bibtex-parse-entry, bibtex-autofill-entry):
Use bibtex-type-in-head and bibtex-key-in-head.
(bibtex-autokey-get-field): Do not alter case of replacement text.
(bibtex-autokey-get-names): Do all processing of name list.
(bibtex-autokey-get-year): New function.
(bibtex-autokey-get-title): Do all processing of title words.
(bibtex-generate-autokey): Simplify.
(bibtex-string-files-init): Use default-directory.
Allow for absolute file names in bibtex-string-files.
(bibtex-files, bibtex-file-path): New variables.
(bibtex-files-expand): New function.
(bibtex-find-entry-globally): New command.
(bibtex-summary-function): New variable.
(bibtex-summary): Default value of bibtex-summary-function.
(bibtex-find-crossref): New optional args pnt and split.
(bibtex-complete-key-cleanup): Call bibtex-summary-function.
(bibtex-copy-summary-as-kill): New command bound to C-cC-t.
(bibtex-validate): Fix docstring.  Check only abbreviated month fields.
Fix handling of required and alternative fields.
Identify duplicate keys even if bibtex-maintain-sorted-entries is nil.
Use cons and display-buffer.
(bibtex-validate-globally): New command.
(bibtex-clean-entry): Use bibtex-files-expand.  Do not call
bibtex-parse-keys and bibtex-parse-strings for updating
bibtex-reference-keys and bibtex-strings.
(bibtex-realign): Remove blank lines past the last entry.
(bibtex-reformat): Use bibtex-entry-format as default.
(bibtex-choose-completion-string): Remove.
(bibtex-complete): Do not use bibtex-choose-completion-string.
(bibtex-url): Simplify.
2004-10-31 22:25:34 +00:00
Stefan Monnier
a9d77f1fbc (bibtex-generate-url-list): Change format. Provide a sample complex default.
(bibtex-url, bibtex-font-lock-url): Adapt to new format.
(bibtex-entry): Use mapc.
2004-09-12 19:52:15 +00:00
Stefan Monnier
d528bff745 (bibtex-mark-active, bibtex-run-with-idle-timer): Move `if' inside the defun.
(bibtex-autokey-titleword-ignore): Regexp is used in a case insensitive env.
(bibtex-mode-map): Rearrange order of menus.
(bibtex-quoted-string-re): Obsolete.
(bibtex-complete-key-cleanup): Variable replaced by new function.
(bibtex-font-lock-keywords): Use backquotes.
(bibtex-font-lock-url-regexp): New internal variable.
(bibtex-name-in-field): New opt arg remove-opt-alt to remove "OPT" and "ALT".
(bibtex-insert-current-kill, bibtex-make-field)
(bibtex-prepare-new-entry, bibtex-yank-pop, bibtex-String): Use unless.
(bibtex-parse-field-text): Simplify.
(bibtex-string=): New helper function.
(bibtex-member-of-regexp): Merge with bibtex-autokey-get-title.
(bibtex-map-entries): Use bibtex-string=.
(bibtex-search-entry): Use not.
(bibtex-enclosing-field): Fix docstring.
(bibtex-assoc-regexp): Obsolete.
(bibtex-format-entry): Use assoc-string and bibtex-string=.
(bibtex-autokey-get-names): Handle empty name field.
(bibtex-parse-strings): Use assoc-string and unless.
(bibtex-complete-string-cleanup): Expansion list is passed as an argument.
Use assoc-string.
(bibtex-pop): Simplify.
(bibtex-mode): Set font-lock-extra-managed-props.
(bibtex-entry-update): Use assoc-string.
(bibtex-parse-entry): Remove "OPT" and "ALT" from FIELD.
(bibtex-autofill-entry): Use bibtex-string=.
(bibtex-print-help-message): Simplify.
(bibtex-find-entry): New optional arg START.
(bibtex-validate): Use bibtex-string= and assoc-string.
Do not call obsolete function compilation-parse-errors.
(bibtex-remove-delimiters): Only remove delimiters if present.
(bibtex-copy-entry-as-kill): Add docstring.
(bibtex-clean-entry): Use bibtex-string=. Handle empty keys.
Detect duplicate keys if bibtex-maintain-sorted-entries is nil.
(bibtex-complete): Use bibtex-predefined-month-strings,
bibtex-string=, and new function bibtex-complete-key-cleanup.
(bibtex-generate-url-list): New variable.
(bibtex-url): New command bound to C-c C-l and mouse-2.
(bibtex-url-map): New local keymap for bibtex-url-mouse.
(bibtex-font-lock-url): New function.
2004-09-10 21:24:50 +00:00
Stefan Monnier
cb75af7678 (bibtex-format-entry): Fix regexps.
(bibtex-parse-strings): Bugfix, use assoc instead of assoc-string.
(bibtex-entry-update): Handle alternatives and optional fields.
(bibtex-parse-entry): Bugfix, handle empty key.
2004-06-01 23:31:00 +00:00
Richard M. Stallman
c2fb641564 Use assoc-string, not assoc-ignore-case. 2004-05-22 21:51:17 +00:00
Stefan Monnier
8bf38a9bfe (bibtex-progress-message): Fix docstring.
(bibtex-entry-update): New command bound to C-c C-u.
(bibtex-text-in-string): Fix regexp.
(bibtex-assoc-of-regexp): Remove.
(bibtex-progress-message): Fix docstring.
(bibtex-inside-field): Use if.
(bibtex-assoc-regexp): New function.
(bibtex-format-entry): Make code more robust so it formats also old entries.
(bibtex-autokey-demangle-title): Merge with obsolete function
bibtex-assoc-of-regexp.
(bibtex-field-list): New function.
(bibtex-entry): Use bibtex-field-list.
(bibtex-parse-entry): Fix docstring.
(bibtex-print-help-message): Use bibtex-field-list.
(bibtex-make-field): Use bibtex-field-list.
(bibtex-entry-index): Bugfix. Return crossref key if required.
(bibtex-lessp): Fix docstring.
2004-05-03 23:04:55 +00:00
Stefan Monnier
4f9ae12265 (bibtex-sort-buffer): Remove error message.
(bibtex-clean-entry): Disentangle code.
(bibtex-realign): New function.
(bibtex-reformat): Use mapcar and bibtex-realign.  Do not use
bibtex-beginning-of-first-entry and bibtex-skip-to-valid-entry.
Remove undocumented optional arg called-by-convert-alien.
(bibtex-convert-alien): Use bibtex-realign.  Use bibtex-reformat
for sorting instead of bibtex-sort-buffer.
2004-05-02 17:17:57 +00:00
Richard M. Stallman
0640e91a85 (bibtex-move-outside-of-entry):
Move backward only if point was not inside an entry.
2003-10-20 23:31:01 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Kai Großjohann
d715b065ad 2003-06-30 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
* textmodes/bibtex.el (bibtex-sort-entry-class): new entry
	catch-all.
	(bibtex-sort-ignore-string-entries): default value t.
	(bibtex-entry-kill-ring-max): Reintroduced as it was removed
	erroneously in previous version.
	(bibtex-string-files): Docstring reflects new parsing scheme.
	(bibtex-autokey-transcriptions): Merge some rewrite entries, fix
	docstring, add # as one of the chars to crush
	(bibtex-autokey-prefix-string, bibtex-autokey-names)
	(bibtex-autokey-names-stretch, bibtex-autokey-additional-names)
	(bibtex-autokey-name-change-strings)
	(bibtex-autokey-name-case-convert, bibtex-autokey-name-length)
	(bibtex-autokey-name-separator, bibtex-autokey-year-length)
	(bibtex-autokey-use-crossref, bibtex-autokey-titlewords)
	(bibtex-autokey-title-terminators)
	(bibtex-autokey-titlewords-stretch)
	(bibtex-autokey-titleword-ignore)
	(bibtex-autokey-titleword-case-convert)
	(bibtex-autokey-titleword-abbrevs)
	(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-before-presentation-function)
	(bibtex-entry-type-history, bibtex-entry-maybe-empty-head): Fix
	docstring.
	(bibtex-strings, bibtex-reference-keys): Use
	lazy-completion-table and make-variable-buffer-local.
	(bibtex-sort-entry-class-alist): Use downcase, account for
	catch-all.
	(bibtex-braced-string-syntax-table)
	(bibtex-quoted-string-syntax-table): New variables.
	(bibtex-parse-nested-braces): Remove.
	(bibtex-parse-field-string): Use syntax table and forward-sexp.
	(bibtex-parse-association): Simplify.
	(bibtex-parse-field-name): Obey bibtex-autoadd-commas.
	(bibtex-parse-field-text): Simplify.
	(bibtex-search-forward-field, bibtex-search-backward-field):
	argument BOUND can take value t.
	(bibtex-start-of-field, bibtex-start-of-name-in-field)
	(bibtex-end-of-name-in-field, bibtex-end-of-field)
	(bibtex-start-of-text-in-field, bibtex-end-of-text-in-field)
	(bibtex-start-of-text-in-string, bibtex-end-of-text-in-string)
	(bibtex-end-of-string, bibtex-type-in-head): Use defsubst.
	(bibtex-skip-to-valid-entry): Return buffer position of beginning
	and ending of entry. Update for changes of bibtex-search-entry.
	Simplify.
	(bibtex-map-entries): FUN is called with three arguments.
	(bibtex-search-entry): Return a cons pair with buffer positions of
	beginning and end of entry.
	(bibtex-enclosing-field): Simplify.
	(bibtex-format-entry): Use booktitle to set a missing title.
	(bibtex-autokey-get-names): Fiddle with regexps.
	(bibtex-generate-autokey): Use identity.
	(bibtex-parse-keys): Use simplified parsing algorithm if
	bibtex-parse-keys-fast is non-nil. Simplify. Change order of
	arguments. Return alist of keys.
	(bibtex-parse-strings): Simplify. Return alist of strings.
	(bibtex-complete-string-cleanup): Fix docstring.
	(bibtex-read-key): New function.
	(bibtex-mode): Fix docstring. Do not parse for keys and
	strings when the mode is entered. Set fill-paragraph-function to
	bibtex-fill-field. Setup font-lock-mark-block-function the way
	font-lock intended.
	(bibtex-entry): Use bibtex-read-key. Obey bibtex-autofill-types.
	(bibtex-parse-entry, bibtex-autofill-entry): New functions.
	(bibtex-print-help-message, bibtex-remove-OPT-or-ALT)
	(bibtex-Preamble): Avoid hard coded constants.
	(bibtex-make-field): Fix docstring. Simplify.
	(bibtex-beginning-of-entry): Always return new position of point.
	(bibtex-end-of-entry): Rearrange cond clauses.
	(bibtex-count-entries, bibtex-validate, bibtex-reformat): Update
	for changes of bibtex-map-entries.
	(bibtex-ispell-abstract): Do not move point.
	(bibtex-entry-index): Use downcase. Simplify.
	(bibtex-lessp): Handle catch-all.
	(bibtex-find-crossref): Turned into a command.
	(bibtex-find-entry): Simplify. Use bibtex-read-key. Fix regexp.
	(bibtex-clean-entry): Use bibtex-read-key. Handle string and
	preamble entries.
	(bibtex-fill-field-bounds): New function.
	(bibtex-fill-field): New command. Bound to
	fill-paragraph-function.
	(bibtex-fill-entry): Use bibtex-fill-field-bounds
	(bibtex-String): Use bibtex-strings. Always obey
	bibtex-sort-ignore-string-entries.
2003-07-05 12:41:24 +00:00
Stefan Monnier
dd310c45a0 (bibtex-member-of-regexp, bibtex-assoc-of-regexp, bibtex-format-entry)
(bibtex-find-entry, bibtex-autokey-demangle-name, bibtex-string-files-init)
(bibtex-mode): Fix up regexp usage and use match-string.
2003-06-02 22:41:50 +00:00
Stefan Monnier
7fbf4804e6 Long overdue merge.
Don't require `compile' since it seems unnecessary.
For all internal variables and functions the docstring comments have
been converted into proper docstrings
(bibtex-maintainer-address, bibtex-maintainer-salutation)
(bibtex-version): Remove support for bug reporting.
(bibtex-field-delimiters, bibtex-entry-delimiters)
(bibtex-sort-ignore-string-entries, bibtex-maintain-sorted-entries)
Replace make-variable-buffer-local by make-local-variable for
(bibtex-entry-format): New tag `required-fields'.
(bibtex-maintain-sorted-entries): New var.
(bibtex-sort-entry-class, bibtex-sort-entry-class-alist): New vars.
(bibtex-predefined-month-strings, bibtex-predefined-strings):
Make into alists with pairs (abbreviation expansion).
(bibtex-autokey-titleword-change-strings)
(bibtex-autokey-transcriptions): Make into alists.
Add new replacement pairs.
(bibtex-autokey-use-crossref): New var.
Replace bibtex-autokey-year-use-crossref-entry because updated code
for autokey generation handles crossrefs independently of
particular fields.
(bibtex-reference-key, bibtex-mode-syntax-table):
Remove = because it can't be part of a string's key.
(bibtex-complete-key-cleanup): New var.
(bibtex-complete): Merge bibtex-complete-string and bibtex-complete-key
into it (and bind to M-tab).
(bibtex-valid-entry-re, bibtex-any-valid-entry-re)
(bibtex-valid-entry-whitespace-re, bibtex-empty-field-re)
(bibtex-quoted-string-re): New vars.
(bibtex-field-name-for-parsing): Don't make-variable-buffer-local.
(zmacs-regions): Declare to quieten the byte-compiler.
(bibtex-comment-start): Don't include the space.
(bibtex-font-lock-syntactic-keywords): New var.
(bibtex-font-lock-keywords): Remove the entry for @Comment.
(bibtex-parse-field-string): Merge the functionality of
bibtex-parse-field-string-braced, bibtex-parse-quoted-string and
bibtex-parse-field-string-quoted.
(bibtex-search-forward-field-string): Remove.
(bibtex-parse-association): Use when.
(bibtex-parse-field-name): Use when.
(bibtex-parse-field-text): Use when and cond.
(bibtex-parse-field): Use let.
(bibtex-search-forward-field, bibtex-search-backward-field):
Make bound optional, use let, setq, and cddr.
(bibtex-start-of-field, bibtex-start-of-name-in-field)
(bibtex-end-of-name-in-field): Use nth.
(bibtex-name-in-field, bibtex-text-in-field-bounds)
(bibtex-text-in-field, bibtex-type-in-head, bibtex-key-in-head)
(bibtex-text-in-string): New functions.
(bibtex-reference-key-in-string): New fun.  Merge of
bibtex-start-of-reference-key-in-string and
bibtex-end-of-reference-key-in-string.
(bibtex-parse-string-prefix): Use let and when.
(bibtex-parse-string-postfix): Use when.
(bibtex-search-forward-string, bibtex-search-backward-string):
Use save-excursion and setq.
(bibtex-member-of-regexp): Use let.
(bibtex-assoc-of-regexp): Use caar und let.
(bibtex-skip-to-valid-entry): Return buffer position.
(bibtex-map-entries): Use save-excursion.
(bibtex-progress-message): Simplify.
(bibtex-search-entry): Use skip-chars-forward, when, save-match-data.
(bibtex-move-outside-of-entry): Handle the case that point is before
first entry.
(bibtex-enclosing-field): Use save-excursion, when.
(bibtex-format-field-delimiters): Merge into bibtex-format-entry.
(bibtex-enclosing-entry-maybe-empty-head): Simplify.
(bibtex-format-entry): Simplify.  Handle new tag required-fields of
bibtex-entry-format.
(bibtex-autokey-abbrev): Accept negative values of len.
(bibtex-autokey-get-field, bibtex-autokey-demangle-title): New funs.
(bibtex-autokey-get-namefield, bibtex-autokey-get-namelist)
(bibtex-autokey-get-yearfield-digits, bibtex-autokey-get-yearfield)
(bibtex-autokey-get-titlestring): Remove.
(bibtex-autokey-get-names): Simplify.
(bibtex-autokey-get-titles): Rename to bibtex-autokey-get-title.
(bibtex-autokey-demangle-name): Simplify, avoid error messages.
(bibtex-generate-autokey): Simplify.
(bibtex-parse-keys): Simplify, use push.
(bibtex-parse-strings): New fun similar to bibtex-parse-keys.
(bibtex-string-files-init): New fun.
(bibtex-parse-buffers-stealthily): Use bibtex-parse-keys,
bibtex-string-files-init and bibtex-parse-strings.
(bibtex-complete): Rename to bibtex-complete-internal, use push,
bibtex-reference-key-in-string, no sorting.
(bibtex-complete-string-cleanup): New fun, displays expansion of
completed strings.
(bibtex-choose-completion-string): New fun.  Required for
choose-completion-string-functions.
(bibtex-do-auto-fill): Remove.  Set fill-prefix in bibtex-mode.
(bibtex-pop): Simplify.
(bibtex-mode): Move setting of bibtex-string to bibtex-parse-strings.
Set choose-completion-string-functions.
(bibtex-print-help-message,bibtex-make-field, bibtex-end-of-entry)
(bibtex-count-entries): Simplify.
(bibtex-entry-index, bibtex-lessp): New funs for generalized sorting
scheme of indices, see bibtex-maintain-sorted-entries.
(bibtex-sort-buffer): Use bibtex-lessp for sorting.
(bibtex-find-crossref, bibtex-find-entry): New funs.
(bibtex-find-entry-location): Rename to bibtex-prepare-new-entry, use
bibtex-lessp, Simplify.
(bibtex-validate): Simplify.  Fixe bug of internal variable
questionable-month.
(bibtex-remove-OPT-or-ALT): Use when.
(bibtex-remove-delimiters, bibtex-kill-field, bibtex-kill-entry)
(bibtex-clean-entry, bibtex-fill-entry, bibtex-reformat): Simplify.
(bibtex-convert-alien): Use deactivate-mark rather than the
non-existent bibtex-mark-active variable.
(bibtex-complete-string, bibtex-complete-key): Merge into new
`smart' defun bibtex-complete.
(bibtex-String): Update for new sorting scheme, distinguish empty and
non-empty key strings.
2003-06-02 22:30:09 +00:00
Juanma Barranquero
db95369be0 Trailing whitespace deleted. 2003-02-04 13:30:45 +00:00
Juanma Barranquero
51b5edd64f (bibtex-find-entry-location): Fix typo. 2002-10-18 08:27:27 +00:00
Juanma Barranquero
c1b32502d0 (bibtex-mode): Fix typo. 2002-08-30 11:01:51 +00:00
Richard M. Stallman
e04464bb32 New maintainer. 2002-06-17 01:02:21 +00:00
Eli Zaretskii
c2345c0d9d Change the maintainer to "none". 2002-06-12 17:24:30 +00:00
Pavel Janík
73cc75b559 (bibtex-sort-ignore-string-entries)
(bibtex-entry-field-alist): Doc fix.
2002-03-16 12:08:49 +00:00
ShengHuo ZHU
3e549b18cf * textmodes/bibtex.el (bibtex-make-field): Call bibtex-find-text
with SILENT so that a new field can be added.
2002-03-06 21:57:10 +00:00
Eli Zaretskii
df8f2eb0c0 (bibtex-parse-keys): Put save-match-data around function body. 2002-02-19 11:21:23 +00:00
Richard M. Stallman
8df9f2a387 (bibtex-parse-buffers-stealthily):
Tell bibtex-parse-keys to output no progress messages.
2002-02-14 01:55:43 +00:00
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