Mercurial > hg > xemacs-beta
comparison lisp/cl.el @ 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 | 8f1ee2d15784 |
children | e29fcfd8df5f |
comparison
equal
deleted
inserted
replaced
4682:648f4a0dac3e | 4683:0cc9d22c3732 |
---|---|
703 (cl-compile-time-init)))) ; In cl-macs.el. | 703 (cl-compile-time-init)))) ; In cl-macs.el. |
704 | 704 |
705 ;;; Try it now in case the compiler has already been loaded. | 705 ;;; Try it now in case the compiler has already been loaded. |
706 (cl-hack-byte-compiler) | 706 (cl-hack-byte-compiler) |
707 | 707 |
708 ;;; Also make a hook in case compiler is loaded after this file. | 708 ;;; Also make a hook in case compiler is loaded after this file. |
709 ;;; The compiler doesn't call any hooks when it loads or runs, but | 709 (add-hook 'bytecomp-load-hook 'cl-hack-byte-compiler) |
710 ;;; we can take advantage of the fact that emacs-lisp-mode will be | |
711 ;;; called when the compiler reads in the file to be compiled. | |
712 ;;; BUG: If the first compilation is `byte-compile' rather than | |
713 ;;; `byte-compile-file', we lose. Emacs has fixed this by hanging it | |
714 ;;; on `bytecomp-load-hook' instead, which we do not have. | |
715 (add-hook 'emacs-lisp-mode-hook 'cl-hack-byte-compiler) | |
716 | |
717 | 710 |
718 ;;; The following ensures that packages which expect the old-style cl.el | 711 ;;; The following ensures that packages which expect the old-style cl.el |
719 ;;; will be happy with this one. | 712 ;;; will be happy with this one. |
720 | 713 |
721 (provide 'cl) | 714 (provide 'cl) |