aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/subr.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index ee6eadaa59f..ddcc36079ed 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -174,6 +174,18 @@ Unibyte strings are converted to multibyte for comparison."
174 (setq element (car alist))) 174 (setq element (car alist)))
175 (setq alist (cdr alist))) 175 (setq alist (cdr alist)))
176 element)) 176 element))
177
178(defun member-ignore-case (elt list)
179 "Like `member', but ignores differences in case and text representation.
180ELT must be a string. Upper-case and lower-case letters are treated as equal.
181Unibyte strings are converted to multibyte for comparison."
182 (let (element)
183 (while (and list (not element))
184 (if (eq t (compare-strings elt 0 nil (car list) 0 nil t))
185 (setq element (car list)))
186 (setq list (cdr list)))
187 element))
188
177 189
178;;;; Keymap support. 190;;;; Keymap support.
179 191