summaryrefslogtreecommitdiff
path: root/lisp/mh-e/mh-acros.el
diff options
context:
space:
mode:
authorBill Wohler <wohler@newt.com>2005-10-23 22:47:27 +0000
committerBill Wohler <wohler@newt.com>2005-10-23 22:47:27 +0000
commit9a51cf9e1c0c1cdc00c3ff6374e9aba52c73ae70 (patch)
treee31d12acc96a4b92ad0b7229f98d640c9489549a /lisp/mh-e/mh-acros.el
parent1dd9796d2b9359b7a8138a3ff95d6afed63e15c1 (diff)
downloademacs-9a51cf9e1c0c1cdc00c3ff6374e9aba52c73ae70.tar.gz
* mh-identity.el (mh-assoc-ignore-case): Merge with version in
mh-alias.el and move to mh-acros.el * mh-alias.el (mh-assoc-ignore-case): Merge with version in mh-identity.el and move to mh-acros.el * mh-acros.el (mh-assoc-ignore-case): Merge of function from mh-identity.el and mh-alias.el.
Diffstat (limited to 'lisp/mh-e/mh-acros.el')
-rw-r--r--lisp/mh-e/mh-acros.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 5cb1c26248b..8136c56ca90 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -134,6 +134,14 @@ various structure fields. Lookup `defstruct' for more details."
(load (format "%s.el" (ad-get-arg 0)) t t))
ad-do-it))
+(defmacro mh-assoc-ignore-case (key alist)
+ "Check if KEY is present in ALIST while ignoring case to do the comparison.
+Compatibility macro for Emacs versions that lack `assoc-string', introduced in
+Emacs 22."
+ (if (fboundp 'assoc-string)
+ `(assoc-string ,key ,alist t)
+ `(assoc-ignore-case ,key ,alist)))
+
(provide 'mh-acros)
;;; Local Variables: