changeset 69872:f60a24914ee2

(byte-compile-form): Only call cl-byte-compile-compiler-macro if it exists.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sat, 08 Apr 2006 14:56:21 +0000
parents 8a7ecbca8672
children 2d844bbbccd4
files lisp/ChangeLog lisp/emacs-lisp/bytecomp.el
diffstat 2 files changed, 19 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Apr 08 14:34:31 2006 +0000
+++ b/lisp/ChangeLog	Sat Apr 08 14:56:21 2006 +0000
@@ -1,7 +1,12 @@
+2006-04-08  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* emacs-lisp/bytecomp.el (byte-compile-form): Don't call
+	cl-byte-compile-compiler-macro unless it exists.
+
 2006-04-08  Eli Zaretskii  <eliz@gnu.org>
 
-	* files.el (hack-local-variables-confirm) <offer-save>: Clarify
-	message text.  Suggested by Ralf Angeli.
+	* files.el (hack-local-variables-confirm) <offer-save>:
+	Clarify message text.  Suggested by Ralf Angeli.
 
 2006-04-08  Michael Cadilhac  <michael.cadilhac@lrde.org>  (tiny change)
 
@@ -388,8 +393,8 @@
 	(cua--init-keymaps): Use it instead of fixed C-return.
 	(cua-mode): Set after it.
 
-	* emulation/cua-rect.el (cua--init-rectangles): Use
-	cua-rectangle-mark-key instead of fixed C-return.
+	* emulation/cua-rect.el (cua--init-rectangles):
+	Use cua-rectangle-mark-key instead of fixed C-return.
 
 2006-03-25  Nick Roberts  <nickrob@snap.net.nz>
 
@@ -425,8 +430,7 @@
 	* progmodes/gdb-ui.el (gdb-continuation): Declare earlier to
 	prevent compiler warnings.
 	(gdb-stopped): Check for gud-last-last-frame (case: signal).
-	(breakpoint-disabled): Make lighter for contrast with overlay
-	arrow.
+	(breakpoint-disabled): Make lighter for contrast with overlay arrow.
 	(gdb-assembler-custom): Use hollow-right-triangle for assembler
 	buffer too.
 
--- a/lisp/emacs-lisp/bytecomp.el	Sat Apr 08 14:34:31 2006 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sat Apr 08 14:56:21 2006 +0000
@@ -2765,9 +2765,15 @@
 		(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))