-rw-r--r-- 1 root root 42867 --- /usr/share/emacs/22.2/lisp/textmodes/bibtex.el.gz 2008-03-01 21:28:31.780465122 +0200 +++ /tmp/bibtex.el 2009-01-24 15:23:26.000000000 +0200 @@ -706,7 +706,7 @@ (defcustom bibtex-autokey-titleword-ignore '("A" "An" "On" "The" "Eine?" "Der" "Die" "Das" - "[^[:upper:]].*" ".*[^[:upper:]0-9].*") + "[^[:upper:]].*" ".*[^[:upper:][:lower:]0-9].*") "Determines words from the title that are not to be used in the key. Each item of the list is a regexp. If a word of the title matches a regexp from that list, it is not included in the title part of the key. @@ -2153,6 +2153,10 @@ ;; gather words from titlestring into a list. Ignore ;; specific words and use only a specific amount of words. (let ((counter 0) + (re (concat "\\`\\(?:" + (mapconcat #'identity + bibtex-autokey-titleword-ignore "\\|") + "\\)\\'") ) titlewords titlewords-extra word) (while (and (or (not (numberp bibtex-autokey-titlewords)) (< counter (+ bibtex-autokey-titlewords @@ -2162,12 +2166,10 @@ titlestring (substring titlestring (match-end 0))) ;; Ignore words matched by one of the elements of ;; bibtex-autokey-titleword-ignore - (unless (let ((lst bibtex-autokey-titleword-ignore)) - (while (and lst - (not (string-match (concat "\\`\\(?:" (car lst) - "\\)\\'") word))) - (setq lst (cdr lst))) - lst) + ;;;;;;;; XXX FIXME: case-fold-search should be unnecessary here + ;; [[:upper:]] and [[:lower:]] should be unaffected by case folding + (unless (let ((case-fold-search nil)) + (string-match re word) ) (setq counter (1+ counter)) (if (or (not (numberp bibtex-autokey-titlewords)) (<= counter bibtex-autokey-titlewords))