summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2006-04-08 14:56:21 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2006-04-08 14:56:21 +0000
commit67438f773f7ac8f651029661ab9b578b80ba0722 (patch)
treeeb127ddf0fe4ff44b5142e55c90b49c63f687bc5 /lisp/emacs-lisp
parentdf631196ed34b92f9b321db3fe0b1a6ae52288c0 (diff)
downloademacs-67438f773f7ac8f651029661ab9b578b80ba0722.tar.gz
emacs-67438f773f7ac8f651029661ab9b578b80ba0722.tar.bz2
emacs-67438f773f7ac8f651029661ab9b578b80ba0722.zip
(byte-compile-form): Only call cl-byte-compile-compiler-macro if it exists.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 64b0a07332b..83620f3344f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2765,9 +2765,15 @@ If FORM is a lambda or a macro, byte-compile it as a function."
(byte-compile-warn "`%s' used from Lisp code\n\
That command is designed for interactive use only" fn))
(if (and handler
- (or (not (byte-compile-version-cond
- byte-compile-compatibility))
- (not (get (get fn 'byte-opcode) 'emacs19-opcode))))
+ ;; Make sure that function exists. This is important
+ ;; for CL compiler macros since the symbol may be
+ ;; `cl-byte-compile-compiler-macro' but if CL isn't
+ ;; loaded, this function doesn't exist.
+ (or (not (memq handler '(cl-byte-compile-compiler-macro)))
+ (fboundp handler))
+ (not (and (byte-compile-version-cond
+ byte-compile-compatibility)
+ (get (get fn 'byte-opcode) 'emacs19-opcode))))
(funcall handler form)
(when (memq 'callargs byte-compile-warnings)
(if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face))