comparison lisp/textmodes/bibtex.el @ 17700:d28dbbfabfb1

(assoc-ignore-case): Function deleted. (bibtex-member-of-regexp): Renamed from member-of-regexp. Call changed.
author Richard M. Stallman <rms@gnu.org>
date Thu, 08 May 1997 06:02:42 +0000
parents 8d8800822c78
children 3864648e9b4f
comparison
equal deleted inserted replaced
17699:b2629af2145e 17700:d28dbbfabfb1
780 ;; needed for the longest name part. 780 ;; needed for the longest name part.
781 781
782 782
783 ;; Helper Functions 783 ;; Helper Functions
784 784
785 (defun assoc-ignore-case (string alist) 785 (defun bibtex-member-of-regexp (string list)
786 ;; Return non-nil if STRING is `equal' to the car of an element of
787 ;; LIST. Comparison is done with case ignored. The value is actually
788 ;; the element of LIST whose car is `equal' to STRING.
789 (or (assoc string alist)
790 (while (and alist
791 (not (string-equal
792 (downcase string)
793 (downcase (car (car alist))))))
794 (setq alist (cdr alist)))
795 (car alist)))
796
797 (defun member-of-regexp (string list)
798 ;; Return non-nil if STRING is exactly matched by an element of 786 ;; Return non-nil if STRING is exactly matched by an element of
799 ;; LIST. This function is influenced by the actual value of 787 ;; LIST. This function is influenced by the actual value of
800 ;; `case-fold-search'. The value is actually the tail of LIST whose 788 ;; `case-fold-search'. The value is actually the tail of LIST whose
801 ;; car matches STRING. 789 ;; car matches STRING.
802 (while 790 (while
1228 (if (or 1216 (if (or
1229 (not (numberp bibtex-autokey-titlewords)) 1217 (not (numberp bibtex-autokey-titlewords))
1230 (< counter bibtex-autokey-titlewords)) 1218 (< counter bibtex-autokey-titlewords))
1231 (if (and 1219 (if (and
1232 first 1220 first
1233 (member-of-regexp 1221 (bibtex-member-of-regexp
1234 titleword 1222 titleword
1235 bibtex-autokey-titleword-first-ignore)) 1223 bibtex-autokey-titleword-first-ignore))
1236 (setq counter -1) 1224 (setq counter -1)
1237 (setq titlewords 1225 (setq titlewords
1238 (append titlewords (list titleword)))) 1226 (append titlewords (list titleword))))