From: Miles Bader Date: Wed, 29 Nov 2000 04:36:30 +0000 (+0000) Subject: (member-ignore-case): Return the tail of the list who's car matches, X-Git-Tag: emacs-pretest-21.0.93~394 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=242c13e8b296e450530c299a3aff06849bd65697;p=emacs.git (member-ignore-case): Return the tail of the list who's car matches, like `member', not the matching element itself. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5600d215ee3..92660226a26 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-11-29 Miles Bader + + * subr.el (member-ignore-case): Return the tail of the list who's + car matches, like `member', not the matching element itself. + 2000-11-29 Kenichi Handa * xml.el (xml-parse-tag): Fix finding opening tag. A tag name diff --git a/lisp/subr.el b/lisp/subr.el index 99d06e43844..3adad4268aa 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -195,12 +195,9 @@ Unibyte strings are converted to multibyte for comparison." "Like `member', but ignores differences in case and text representation. ELT must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison." - (let (element) - (while (and list (not element)) - (if (eq t (compare-strings elt 0 nil (car list) 0 nil t)) - (setq element (car list))) - (setq list (cdr list))) - element)) + (while (and list (not (eq t (compare-strings elt 0 nil (car list) 0 nil t)))) + (setq list (cdr list))) + list) ;;;; Keymap support.