diff options
| author | Mike Kupfer | 2017-05-04 14:30:17 -0800 |
|---|---|---|
| committer | Mike Kupfer | 2017-05-04 15:30:17 -0700 |
| commit | 167f47d202c6f68105f6f1e80922d5513d9ec7f4 (patch) | |
| tree | 7765b2a03c880d72fe68393b1da227516df7b6bc | |
| parent | d15a4805d6347412ae1d605dcf5e8d3fe0f8e743 (diff) | |
| download | emacs-167f47d202c6f68105f6f1e80922d5513d9ec7f4.tar.gz emacs-167f47d202c6f68105f6f1e80922d5513d9ec7f4.zip | |
Fix MH-E not to load cl at runtime (Bug#25552)
* lisp/mh-e/mh-acros.el (defun-mh): Check at runtime, not
compile time, whether the target is bound.
* lisp/mh-e/mh-compat.el: Enable compilation. Pull in
mh-acros at compile time.
Authored-by: Glenn Morris <rgm@gnu.org>, Noam Postavsky
<npostavs@users.sourceforge.net>
| -rw-r--r-- | lisp/mh-e/mh-acros.el | 7 | ||||
| -rw-r--r-- | lisp/mh-e/mh-compat.el | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index 0c89efbe3c1..d424247a4fc 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el | |||
| @@ -90,10 +90,9 @@ loads \"cl\" appropriately." | |||
| 90 | "Create function NAME. | 90 | "Create function NAME. |
| 91 | If FUNCTION exists, then NAME becomes an alias for FUNCTION. | 91 | If FUNCTION exists, then NAME becomes an alias for FUNCTION. |
| 92 | Otherwise, create function NAME with ARG-LIST and BODY." | 92 | Otherwise, create function NAME with ARG-LIST and BODY." |
| 93 | (let ((defined-p (fboundp function))) | 93 | `(if (fboundp ',function) |
| 94 | (if defined-p | 94 | (defalias ',name ',function) |
| 95 | `(defalias ',name ',function) | 95 | (defun ,name ,arg-list ,@body))) |
| 96 | `(defun ,name ,arg-list ,@body)))) | ||
| 97 | (put 'defun-mh 'lisp-indent-function 'defun) | 96 | (put 'defun-mh 'lisp-indent-function 'defun) |
| 98 | (put 'defun-mh 'doc-string-elt 4) | 97 | (put 'defun-mh 'doc-string-elt 4) |
| 99 | 98 | ||
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 3f3990e8695..099fc9bbbaa 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ;; Items are listed alphabetically (except for mh-require which is | 40 | ;; Items are listed alphabetically (except for mh-require which is |
| 41 | ;; needed sooner it would normally appear). | 41 | ;; needed sooner it would normally appear). |
| 42 | 42 | ||
| 43 | (require 'mh-acros) | 43 | (eval-when-compile (require 'mh-acros)) |
| 44 | 44 | ||
| 45 | (mh-do-in-gnu-emacs | 45 | (mh-do-in-gnu-emacs |
| 46 | (defalias 'mh-require 'require)) | 46 | (defalias 'mh-require 'require)) |
| @@ -374,7 +374,6 @@ XEmacs." | |||
| 374 | (provide 'mh-compat) | 374 | (provide 'mh-compat) |
| 375 | 375 | ||
| 376 | ;; Local Variables: | 376 | ;; Local Variables: |
| 377 | ;; no-byte-compile: t | ||
| 378 | ;; indent-tabs-mode: nil | 377 | ;; indent-tabs-mode: nil |
| 379 | ;; sentence-end-double-space: nil | 378 | ;; sentence-end-double-space: nil |
| 380 | ;; End: | 379 | ;; End: |