--- emacs-snapshot-20090207/lisp/textmodes/bibtex.el~ 2009-01-17 16:58:53.000000000 +0200 +++ emacs-snapshot-20090207/lisp/textmodes/bibtex.el 2009-02-19 15:33:43.000000000 +0200 @@ -746,7 +746,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. @@ -2307,6 +2307,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 @@ -2316,12 +2320,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))