diff options
| author | Richard M. Stallman | 1994-01-01 17:32:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-01 17:32:23 +0000 |
| commit | 7bdf031dc835e1a8c20fd458a627bb183a7c53fe (patch) | |
| tree | 312f7579a0adb4fced09238fa964e15d71bf522b | |
| parent | 91d39bf04a9971dd8eee33c55f75c5df22a88b27 (diff) | |
| download | emacs-7bdf031dc835e1a8c20fd458a627bb183a7c53fe.tar.gz emacs-7bdf031dc835e1a8c20fd458a627bb183a7c53fe.zip | |
(bibtex-field-name, bibtex-field-const, bibtex-field-text):
Adapted to Emacs 19 regex rules.
(bibtex-reference): Removed one set of parentheses (a workaround).
| -rw-r--r-- | lisp/textmodes/bibtex.el | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 4d7e5908005..a582a0d6746 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -455,8 +455,12 @@ types, e.g. a crossreference document of organization types.") | |||
| 455 | ;;; Amendment: I couldn't get a regexp with both "[]"'s and hyphen to | 455 | ;;; Amendment: I couldn't get a regexp with both "[]"'s and hyphen to |
| 456 | ;;; work. It looks like you need them both to be the first entries in a | 456 | ;;; work. It looks like you need them both to be the first entries in a |
| 457 | ;;; regexp pattern. [alarson:19930315.0900CST] | 457 | ;;; regexp pattern. [alarson:19930315.0900CST] |
| 458 | ;;; | ||
| 459 | ;;; New amendment[MB]: I have corrected the following regexp according to | ||
| 460 | ;;; emacs19 rules. I also added ']' to the list of characters allowed in | ||
| 461 | ;;; a field name. | ||
| 458 | 462 | ||
| 459 | (defconst bibtex-field-name "[A-Za-z][---A-Za-z0-9.:;?!`'()/*@_+=]*" | 463 | (defconst bibtex-field-name "[A-Za-z][]A-Za-z0-9.:;?!`'()/*@_+=-]*" |
| 460 | "Regexp defining the name part of a bibtex field.") | 464 | "Regexp defining the name part of a bibtex field.") |
| 461 | 465 | ||
| 462 | ;; bibtex-field-text must be able to handle | 466 | ;; bibtex-field-text must be able to handle |
| @@ -469,7 +473,7 @@ types, e.g. a crossreference document of organization types.") | |||
| 469 | ;; i have added a few of these, but not all! -- MON | 473 | ;; i have added a few of these, but not all! -- MON |
| 470 | 474 | ||
| 471 | (defconst bibtex-field-const | 475 | (defconst bibtex-field-const |
| 472 | "[0-9A-Za-z][---A-Za-z0-9:_+]*" | 476 | "[0-9A-Za-z][A-Za-z0-9:_+-]*" |
| 473 | "Format of a bibtex field constant.") | 477 | "Format of a bibtex field constant.") |
| 474 | 478 | ||
| 475 | (defconst bibtex-field-string | 479 | (defconst bibtex-field-string |
| @@ -491,7 +495,7 @@ an empty string, or a constant followed by one or more # / constant pairs. | |||
| 491 | Also matches simple {...} patterns.") | 495 | Also matches simple {...} patterns.") |
| 492 | 496 | ||
| 493 | ;(defconst bibtex-field-text | 497 | ;(defconst bibtex-field-text |
| 494 | ; "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][---A-Za-z0-9:_+]*" | 498 | ; "\"[^\"]*[^\\\\]\"\\|\"\"\\|[0-9A-Za-z][A-Za-z0-9:_+-]*" |
| 495 | ; "Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.") | 499 | ; "Regexp defining the text part of a bibtex field: either a string, or an empty string, or a constant.") |
| 496 | 500 | ||
| 497 | (defconst bibtex-field | 501 | (defconst bibtex-field |
| @@ -521,9 +525,16 @@ Also matches simple {...} patterns.") | |||
| 521 | bibtex-reference-head") | 525 | bibtex-reference-head") |
| 522 | 526 | ||
| 523 | (defconst bibtex-reference | 527 | (defconst bibtex-reference |
| 524 | (concat bibtex-reference-head | 528 | (concat |
| 525 | "\\([ \t\n]*" bibtex-field "\\)*" | 529 | ;; This is the unparenthesized equivalent of bibtex-reference-head: |
| 526 | "[ \t\n]*[})]") | 530 | "^[ \t]*" |
| 531 | bibtex-reference-type | ||
| 532 | "[ \t]*[({]\\(" | ||
| 533 | bibtex-field-name | ||
| 534 | "\\)" | ||
| 535 | ;; End of unparenthesized equivalent of bibtex-reference-head | ||
| 536 | "\\([ \t\n]*" bibtex-field "\\)*" | ||
| 537 | "[ \t\n]*[})]") | ||
| 527 | "Regexp defining the format of a bibtex reference entry") | 538 | "Regexp defining the format of a bibtex reference entry") |
| 528 | (defconst bibtex-type-in-reference bibtex-type-in-head | 539 | (defconst bibtex-type-in-reference bibtex-type-in-head |
| 529 | "The regexp subexpression number of the type part in bibtex-reference") | 540 | "The regexp subexpression number of the type part in bibtex-reference") |