diff options
| author | Stefan Monnier | 2005-04-10 20:35:00 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-04-10 20:35:00 +0000 |
| commit | a172852f2bf3eabd244f380cd5b12b871284a0f7 (patch) | |
| tree | f9114d4dd92558460066a08ab0c02da5b3ebccfa | |
| parent | ba833b25a7f8ac2e5976f7b7653d63778db5a5a8 (diff) | |
| download | emacs-a172852f2bf3eabd244f380cd5b12b871284a0f7.tar.gz emacs-a172852f2bf3eabd244f380cd5b12b871284a0f7.zip | |
(bibtex-autokey-titleword-ignore, bibtex-reference-key)
(bibtex-autokey-demangle-name, bibtex-mode): Use char-classes to accept
non-ascii letters, accepted in some recent bibtex implementations.
| -rw-r--r-- | lisp/textmodes/bibtex.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 3e5b77d8baa..69a456f1d70 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el | |||
| @@ -652,7 +652,7 @@ See `bibtex-generate-autokey' for details." | |||
| 652 | 652 | ||
| 653 | (defcustom bibtex-autokey-titleword-ignore | 653 | (defcustom bibtex-autokey-titleword-ignore |
| 654 | '("A" "An" "On" "The" "Eine?" "Der" "Die" "Das" | 654 | '("A" "An" "On" "The" "Eine?" "Der" "Die" "Das" |
| 655 | "[^A-Z].*" ".*[^A-Z0-9].*") | 655 | "[^[:upper:]].*" ".*[^[:upper:]0-9].*") |
| 656 | "Determines words from the title that are not to be used in the key. | 656 | "Determines words from the title that are not to be used in the key. |
| 657 | Each item of the list is a regexp. If a word of the title matches a | 657 | Each item of the list is a regexp. If a word of the title matches a |
| 658 | regexp from that list, it is not included in the title part of the key. | 658 | regexp from that list, it is not included in the title part of the key. |
| @@ -1078,10 +1078,10 @@ The CDRs of the elements are t for header keys and nil for crossref keys.") | |||
| 1078 | (defconst bibtex-entry-type (concat "@" bibtex-field-name) | 1078 | (defconst bibtex-entry-type (concat "@" bibtex-field-name) |
| 1079 | "Regexp matching the type part of a BibTeX entry.") | 1079 | "Regexp matching the type part of a BibTeX entry.") |
| 1080 | 1080 | ||
| 1081 | (defconst bibtex-reference-key "[][a-zA-Z0-9.:;?!`'/*@+|()<>&_^$-]+" | 1081 | (defconst bibtex-reference-key "[][[:alnum:].:;?!`'/*@+|()<>&_^$-]+" |
| 1082 | "Regexp matching the reference key part of a BibTeX entry.") | 1082 | "Regexp matching the reference key part of a BibTeX entry.") |
| 1083 | 1083 | ||
| 1084 | (defconst bibtex-field-const "[][a-zA-Z0-9.:;?!`'/*@+=|<>&_^$-]+" | 1084 | (defconst bibtex-field-const "[][[:alnum:].:;?!`'/*@+=|<>&_^$-]+" |
| 1085 | "Regexp matching a BibTeX field constant.") | 1085 | "Regexp matching a BibTeX field constant.") |
| 1086 | 1086 | ||
| 1087 | (defconst bibtex-entry-head | 1087 | (defconst bibtex-entry-head |
| @@ -2103,7 +2103,7 @@ and `bibtex-autokey-names-stretch'." | |||
| 2103 | (defun bibtex-autokey-demangle-name (fullname) | 2103 | (defun bibtex-autokey-demangle-name (fullname) |
| 2104 | "Get the last part from a well-formed FULLNAME and perform abbreviations." | 2104 | "Get the last part from a well-formed FULLNAME and perform abbreviations." |
| 2105 | (let* (case-fold-search | 2105 | (let* (case-fold-search |
| 2106 | (name (cond ((string-match "\\([A-Z][^, ]*\\)[^,]*," fullname) | 2106 | (name (cond ((string-match "\\([[:upper:]][^, ]*\\)[^,]*," fullname) |
| 2107 | ;; Name is of the form "von Last, First" or | 2107 | ;; Name is of the form "von Last, First" or |
| 2108 | ;; "von Last, Jr, First" | 2108 | ;; "von Last, Jr, First" |
| 2109 | ;; --> Take the first capital part before the comma | 2109 | ;; --> Take the first capital part before the comma |
| @@ -2112,7 +2112,7 @@ and `bibtex-autokey-names-stretch'." | |||
| 2112 | ;; Strange name: we have a comma, but nothing capital | 2112 | ;; Strange name: we have a comma, but nothing capital |
| 2113 | ;; So we accept even lowercase names | 2113 | ;; So we accept even lowercase names |
| 2114 | (match-string 1 fullname)) | 2114 | (match-string 1 fullname)) |
| 2115 | ((string-match "\\(\\<[a-z][^ ]* +\\)+\\([A-Z][^ ]*\\)" | 2115 | ((string-match "\\(\\<[[:lower:]][^ ]* +\\)+\\([[:upper:]][^ ]*\\)" |
| 2116 | fullname) | 2116 | fullname) |
| 2117 | ;; name is of the form "First von Last", "von Last", | 2117 | ;; name is of the form "First von Last", "von Last", |
| 2118 | ;; "First von von Last", or "d'Last" | 2118 | ;; "First von von Last", or "d'Last" |
| @@ -2796,7 +2796,7 @@ if that value is non-nil. | |||
| 2796 | (set (make-local-variable 'comment-start-skip) | 2796 | (set (make-local-variable 'comment-start-skip) |
| 2797 | (concat (regexp-quote bibtex-comment-start) "\\>[ \t]*")) | 2797 | (concat (regexp-quote bibtex-comment-start) "\\>[ \t]*")) |
| 2798 | (set (make-local-variable 'comment-column) 0) | 2798 | (set (make-local-variable 'comment-column) 0) |
| 2799 | (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[a-zA-Z0-9]+[ \t]*") | 2799 | (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[[:alnum:]]+[ \t]*") |
| 2800 | (set (make-local-variable 'outline-regexp) "[ \t]*@") | 2800 | (set (make-local-variable 'outline-regexp) "[ \t]*@") |
| 2801 | (set (make-local-variable 'fill-paragraph-function) 'bibtex-fill-field) | 2801 | (set (make-local-variable 'fill-paragraph-function) 'bibtex-fill-field) |
| 2802 | (set (make-local-variable 'fill-prefix) (make-string (+ bibtex-entry-offset | 2802 | (set (make-local-variable 'fill-prefix) (make-string (+ bibtex-entry-offset |
| @@ -2825,7 +2825,7 @@ if that value is non-nil. | |||
| 2825 | ;; XEmacs needs easy-menu-add, Emacs does not care | 2825 | ;; XEmacs needs easy-menu-add, Emacs does not care |
| 2826 | (easy-menu-add bibtex-edit-menu) | 2826 | (easy-menu-add bibtex-edit-menu) |
| 2827 | (easy-menu-add bibtex-entry-menu) | 2827 | (easy-menu-add bibtex-entry-menu) |
| 2828 | (run-hooks 'bibtex-mode-hook)) | 2828 | (run-mode-hooks 'bibtex-mode-hook)) |
| 2829 | 2829 | ||
| 2830 | (defun bibtex-field-list (entry-type) | 2830 | (defun bibtex-field-list (entry-type) |
| 2831 | "Return list of allowed fields for entry ENTRY-TYPE. | 2831 | "Return list of allowed fields for entry ENTRY-TYPE. |