]> git.eshelyaron.com Git - emacs.git/commitdiff
(member-ignore-case): Return the tail of the list who's car matches,
authorMiles Bader <miles@gnu.org>
Wed, 29 Nov 2000 04:36:30 +0000 (04:36 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 29 Nov 2000 04:36:30 +0000 (04:36 +0000)
like `member', not the matching element itself.

lisp/ChangeLog
lisp/subr.el

index 5600d215ee3dd2e8ceb9c9bb40bda60c3812e7e0..92660226a262a4da2b0a9d0b111cac53d27d609f 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-29  Miles Bader  <miles@gnu.org>
+
+       * 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  <handa@etl.go.jp>
 
        * xml.el (xml-parse-tag): Fix finding opening tag.  A tag name
index 99d06e4384497b7229f18a48ff80ffa18ddc8a45..3adad4268aa35afe2ef25c9a488ad452253b7d27 100644 (file)
@@ -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)
 
 \f
 ;;;; Keymap support.