diff options
| author | Miles Bader | 2000-11-29 04:36:30 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-11-29 04:36:30 +0000 |
| commit | 242c13e8b296e450530c299a3aff06849bd65697 (patch) | |
| tree | c7b7d89048bb554d50fe3fd7153a6a68b69acb9e | |
| parent | af9bd5396c78f6fc4865735247dae16b067acf92 (diff) | |
| download | emacs-242c13e8b296e450530c299a3aff06849bd65697.tar.gz emacs-242c13e8b296e450530c299a3aff06849bd65697.zip | |
(member-ignore-case): Return the tail of the list who's car matches,
like `member', not the matching element itself.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/subr.el | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5600d215ee3..92660226a26 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-11-29 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (member-ignore-case): Return the tail of the list who's | ||
| 4 | car matches, like `member', not the matching element itself. | ||
| 5 | |||
| 1 | 2000-11-29 Kenichi Handa <handa@etl.go.jp> | 6 | 2000-11-29 Kenichi Handa <handa@etl.go.jp> |
| 2 | 7 | ||
| 3 | * xml.el (xml-parse-tag): Fix finding opening tag. A tag name | 8 | * 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." | |||
| 195 | "Like `member', but ignores differences in case and text representation. | 195 | "Like `member', but ignores differences in case and text representation. |
| 196 | ELT must be a string. Upper-case and lower-case letters are treated as equal. | 196 | ELT must be a string. Upper-case and lower-case letters are treated as equal. |
| 197 | Unibyte strings are converted to multibyte for comparison." | 197 | Unibyte strings are converted to multibyte for comparison." |
| 198 | (let (element) | 198 | (while (and list (not (eq t (compare-strings elt 0 nil (car list) 0 nil t)))) |
| 199 | (while (and list (not element)) | 199 | (setq list (cdr list))) |
| 200 | (if (eq t (compare-strings elt 0 nil (car list) 0 nil t)) | 200 | list) |
| 201 | (setq element (car list))) | ||
| 202 | (setq list (cdr list))) | ||
| 203 | element)) | ||
| 204 | 201 | ||
| 205 | 202 | ||
| 206 | ;;;; Keymap support. | 203 | ;;;; Keymap support. |