annotate lisp/mh-e/mh-acros.el @ 67020:2385088bbb84

(nextcons, xcdr, xfloat): Update for changes in Lisp_Cons and Lisp_Float.
author Andreas Schwab <schwab@suse.de>
date Sat, 19 Nov 2005 17:13:07 +0000
parents f5ade15d46f2
children 3a8785724cca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1 ;;; mh-acros.el --- Macros used in MH-E
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
3 ;; Copyright (C) 2004 Free Software Foundation, Inc.
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
4
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
5 ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Keywords: mail
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; See: mh-e.el
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
9
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; any later version.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
25 ;; Boston, MA 02110-1301, USA.
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
26
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
27 ;;; Commentary:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
29 ;; This file contains macros that would normally be in mh-utils.el except that
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
30 ;; their presence there would cause a dependency loop with mh-customize.el.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
31 ;; This file must always be included like this:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32 ;;
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33 ;; (eval-when-compile (require 'mh-acros))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
34 ;;
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35 ;; It is so named with a silent `m' so that it is compiled first. Otherwise,
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36 ;; "make recompile" in Emacs 21.4 fails.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
37
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
38 ;;; Change Log:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40 ;;; Code:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
41
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42 (require 'cl)
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
43 (require 'advice)
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 ;; The Emacs coding conventions require that the cl package not be required at
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46 ;; runtime. However, the cl package in versions of Emacs prior to 21.4 left cl
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
47 ;; routines in their macro expansions. Use mh-require-cl to provide the cl
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48 ;; routines in the best way possible.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
49 (defmacro mh-require-cl ()
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
50 "Macro to load `cl' if needed.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
51 Some versions of `cl' produce code for the expansion of
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
52 \(setf (gethash ...) ...) that uses functions in `cl' at run time. This macro
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
53 recognizes that and loads `cl' where appropriate."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
54 (if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash)
56787
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
55 `(require 'cl)
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
56 `(eval-when-compile (require 'cl))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
57
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
58 ;;; Macros to generate correct code for different emacs variants
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
59
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
60 (defmacro mh-do-in-gnu-emacs (&rest body)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
61 "Execute BODY if in GNU Emacs."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
62 (unless (featurep 'xemacs) `(progn ,@body)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
63 (put 'mh-do-in-gnu-emacs 'lisp-indent-hook 'defun)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
64
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65 (defmacro mh-do-in-xemacs (&rest body)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 "Execute BODY if in GNU Emacs."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
67 (when (featurep 'xemacs) `(progn ,@body)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68 (put 'mh-do-in-xemacs 'lisp-indent-hook 'defun)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70 (defmacro mh-funcall-if-exists (function &rest args)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71 "Call FUNCTION with ARGS as parameters if it exists."
62847
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
72 (when (fboundp function)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
73 `(when (fboundp ',function)
aa8c2e12ee24 Upgraded to MH-E version 7.84.
Bill Wohler <wohler@newt.com>
parents: 62465
diff changeset
74 (funcall ',function ,@args))))
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76 (defmacro mh-make-local-hook (hook)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77 "Make HOOK local if needed.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
78 XEmacs and versions of GNU Emacs before 21.1 require `make-local-hook' to be
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
79 called."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
80 (when (and (fboundp 'make-local-hook)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
81 (not (get 'make-local-hook 'byte-obsolete-info)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
82 `(make-local-hook ,hook)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
83
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
84 (defmacro mh-mark-active-p (check-transient-mark-mode-flag)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
85 "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
86 In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
87 variable `transient-mark-mode' is active."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
88 (cond ((featurep 'xemacs) ;XEmacs
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
89 `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
90 ((not check-transient-mark-mode-flag) ;GNU Emacs
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
91 `(and (boundp 'mark-active) mark-active))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
92 (t ;GNU Emacs
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
93 `(and (boundp 'transient-mark-mode) transient-mark-mode
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
94 (boundp 'mark-active) mark-active))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
95
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
96 (defmacro mh-defstruct (name-spec &rest fields)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
97 "Replacement for `defstruct' from the `cl' package.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
98 The `defstruct' in the `cl' library produces compiler warnings, and generates
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
99 code that uses functions present in `cl' at run-time. This is a partial
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
100 replacement, that avoids these issues.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
101
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
102 NAME-SPEC declares the name of the structure, while FIELDS describes the
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
103 various structure fields. Lookup `defstruct' for more details."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
104 (let* ((struct-name (if (atom name-spec) name-spec (car name-spec)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
105 (conc-name (or (and (consp name-spec)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
106 (cadr (assoc :conc-name (cdr name-spec))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
107 (format "%s-" struct-name)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
108 (predicate (intern (format "%s-p" struct-name)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
109 (constructor (or (and (consp name-spec)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
110 (cadr (assoc :constructor (cdr name-spec))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
111 (intern (format "make-%s" struct-name))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
112 (field-names (mapcar #'(lambda (x) (if (atom x) x (car x))) fields))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
113 (field-init-forms (mapcar #'(lambda (x) (and (consp x) (cadr x)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
114 fields))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
115 (struct (gensym "S"))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
116 (x (gensym "X"))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
117 (y (gensym "Y")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
118 `(progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
119 (defun* ,constructor (&key ,@(mapcar* #'(lambda (x y) (list x y))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
120 field-names field-init-forms))
56751
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56677
diff changeset
121 (list (quote ,struct-name) ,@field-names))
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
122 (defun ,predicate (arg)
56751
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56677
diff changeset
123 (and (consp arg) (eq (car arg) (quote ,struct-name))))
72a02133177e Upgraded to MH-E version 7.81.
Bill Wohler <wohler@newt.com>
parents: 56677
diff changeset
124 ,@(loop for x from 1
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
125 for y in field-names
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
126 collect `(defmacro ,(intern (format "%s%s" conc-name y)) (z)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
127 (list 'nth ,x z)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
128 (quote ,struct-name))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
129
56787
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
130 (defadvice require (around mh-prefer-el activate)
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
131 "Modify `require' to load uncompiled MH-E files."
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
132 (or (featurep (ad-get-arg 0))
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
133 (and (string-match "^mh-" (symbol-name (ad-get-arg 0)))
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
134 (load (format "%s.el" (ad-get-arg 0)) t t))
25da1d331c99 Upgraded to MH-E version 7.82.
Bill Wohler <wohler@newt.com>
parents: 56751
diff changeset
135 ad-do-it))
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
136
66357
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
137 (defmacro mh-assoc-ignore-case (key alist)
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
138 "Check if KEY is present in ALIST while ignoring case to do the comparison.
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
139 Compatibility macro for Emacs versions that lack `assoc-string', introduced in
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
140 Emacs 22."
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
141 (if (fboundp 'assoc-string)
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
142 `(assoc-string ,key ,alist t)
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
143 `(assoc-ignore-case ,key ,alist)))
f5ade15d46f2 * mh-identity.el (mh-assoc-ignore-case): Merge with version in
Bill Wohler <wohler@newt.com>
parents: 64085
diff changeset
144
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
145 (provide 'mh-acros)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
146
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
147 ;;; Local Variables:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
148 ;;; no-byte-compile: t
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
149 ;;; indent-tabs-mode: nil
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
150 ;;; sentence-end-double-space: nil
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
151 ;;; End:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
152
56677
5aafbbdd005f Add arch taglines
Miles Bader <miles@gnu.org>
parents: 56676
diff changeset
153 ;; arch-tag: b383b49a-494f-4ed0-a30a-cb6d5d2da4ff
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
154 ;;; mh-acros.el ends here