changeset 4683:0cc9d22c3732

Be more reliable about loading cl-macs at byte-compile time, cl.el. lisp/ChangeLog addition: 2009-08-27 Aidan Kehoe <kehoea@parhasard.net> * cl.el (bytecomp-load-hook): New. * bytecomp.el (bytecomp-load-hook): Use id. Merge Dave Love's 2000-02-02 GNU (GPLv2) change, forcing the byte-compiler to be more consistent about loading cl-macs at compile time.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 27 Aug 2009 15:18:51 +0100
parents 648f4a0dac3e
children 15c42a3f4065
files lisp/ChangeLog lisp/bytecomp.el lisp/cl.el
diffstat 3 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Aug 24 15:21:21 2009 -0600
+++ b/lisp/ChangeLog	Thu Aug 27 15:18:51 2009 +0100
@@ -1,3 +1,11 @@
+2009-08-27  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* cl.el (bytecomp-load-hook): New.
+	* bytecomp.el (bytecomp-load-hook): Use id. 
+	Merge Dave Love's 2000-02-02 GNU (GPLv2) change, forcing the
+	byte-compiler to be more consistent about loading cl-macs at
+	compile time. 
+
 2009-08-19  Malcolm Purvis  <malcolmp@xemacs.org>
 
 	* simple.el:
--- a/lisp/bytecomp.el	Mon Aug 24 15:21:21 2009 -0600
+++ b/lisp/bytecomp.el	Thu Aug 27 15:18:51 2009 +0100
@@ -4526,4 +4526,6 @@
 		 byte-compile-variable-ref))))
  nil)
 
+(run-hooks 'bytecomp-load-hook)
+
 ;;; bytecomp.el ends here
--- a/lisp/cl.el	Mon Aug 24 15:21:21 2009 -0600
+++ b/lisp/cl.el	Thu Aug 27 15:18:51 2009 +0100
@@ -705,15 +705,8 @@
 ;;; Try it now in case the compiler has already been loaded.
 (cl-hack-byte-compiler)
 
-;;; Also make a hook in case compiler is loaded after this file.
-;;; The compiler doesn't call any hooks when it loads or runs, but
-;;; we can take advantage of the fact that emacs-lisp-mode will be
-;;; called when the compiler reads in the file to be compiled.
-;;; BUG: If the first compilation is `byte-compile' rather than
-;;; `byte-compile-file', we lose.  Emacs has fixed this by hanging it
-;;; on `bytecomp-load-hook' instead, which we do not have.
-(add-hook 'emacs-lisp-mode-hook 'cl-hack-byte-compiler)
-
+;;; Also make a hook in case compiler is loaded after this file. 
+(add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler)
 
 ;;; The following ensures that packages which expect the old-style cl.el
 ;;; will be happy with this one.